summaryrefslogtreecommitdiff
path: root/rubysig.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-17 15:17:10 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-17 15:17:10 +0000
commit92e4b1b06e10557e1cfce4962b55f4960f6ed5b5 (patch)
treecf75a2e8fc6fd90fd2c907ac0d5af7803bd74452 /rubysig.h
parente1c29a3f13a8d5ca0f9a4e491a752c73aca1d721 (diff)
* win32/win32.c: fasten file I/O on mswin32/mingw32.
* win32/win32.h: ditto. * rubysig.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubysig.h')
-rw-r--r--rubysig.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/rubysig.h b/rubysig.h
index a2f6c2c..d6de009 100644
--- a/rubysig.h
+++ b/rubysig.h
@@ -22,12 +22,14 @@ typedef LONG rb_atomic_t;
# define ATOMIC_DEC(var) InterlockedDecrement(&(var))
/* Windows doesn't allow interrupt while system calls */
-# define TRAP_BEG win32_enter_syscall()
-# define TRAP_END win32_leave_syscall()
+# define TRAP_BEG do {\
+ rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1);
+# define TRAP_END ATOMIC_SET(rb_trap_immediate, trap_immediate);\
+} while (0)
# define RUBY_CRITICAL(statements) do {\
- win32_disable_interrupt();\
+ win32_enter_critical();\
statements;\
- win32_enable_interrupt();\
+ win32_leave_critical();\
} while (0)
#else
typedef int rb_atomic_t;