~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/emulator/sys/win32/sys_interrupt.c

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 * 
4
 
 * Copyright Ericsson AB 1997-2009. All Rights Reserved.
 
4
 * Copyright Ericsson AB 1997-2011. All Rights Reserved.
5
5
 * 
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
19
19
/*
20
20
 * Purpose: Interrupt handling in windows.
21
21
 */
 
22
#ifdef HAVE_CONFIG_H
 
23
#  include "config.h"
 
24
#endif
22
25
#include "sys.h"
23
26
#include "erl_alloc.h"
 
27
#include "erl_thr_progress.h"
24
28
#include "erl_driver.h"
25
29
#include "../../drivers/win32/win_con.h"
26
30
 
31
35
#endif
32
36
 
33
37
#ifdef ERTS_SMP
34
 
erts_smp_atomic_t erts_break_requested;
 
38
erts_smp_atomic32_t erts_break_requested;
35
39
#define ERTS_SET_BREAK_REQUESTED \
36
 
  erts_smp_atomic_set(&erts_break_requested, (long) 1)
 
40
  erts_smp_atomic32_set_nob(&erts_break_requested, (erts_aint32_t) 1)
37
41
#define ERTS_UNSET_BREAK_REQUESTED \
38
 
  erts_smp_atomic_set(&erts_break_requested, (long) 0)
 
42
  erts_smp_atomic32_set_nob(&erts_break_requested, (erts_aint32_t) 0)
39
43
#else
40
44
volatile int erts_break_requested = 0;
41
45
#define ERTS_SET_BREAK_REQUESTED (erts_break_requested = 1)
52
56
     * therefore, make sure that all threads but this one are blocked before
53
57
     * proceeding!
54
58
     */
55
 
    erts_smp_block_system(0);
 
59
    erts_smp_thr_progress_block();
56
60
    /* call the break handling function, reset the flag */
57
61
    do_break();
58
62
 
59
63
    ResetEvent(erts_sys_break_event);
60
64
    ERTS_UNSET_BREAK_REQUESTED;
61
65
 
62
 
    erts_smp_release_system();
 
66
    erts_smp_thr_progress_unblock();
63
67
}
64
68
 
65
69