summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-14 07:10:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-11-14 07:10:31 +0000
commit46620a87720943120cabe6ffe2e94a2c3506c4c2 (patch)
tree472565a24cc842b64c3b97f573688154a1ac75bb /win32/win32.h
parente9cf3b3bf56646e94df9189bfe8d6449b79ca0fb (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.h')
-rw-r--r--win32/win32.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/win32/win32.h b/win32/win32.h
index d0e18152e5c..29767814012 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -427,17 +427,23 @@ struct tms {
#define times mytimes
/* thread stuff */
-/* initialized by NtInitialize() */
-HANDLE rb_CurrentProcessHandle;
-HANDLE rb_MainThreadHandle;
-HANDLE rb_InterruptEvent;
-DWORD rb_MainThreadId;
-
HANDLE GetCurrentThreadHandle(void);
int win32_main_context(int arg, void (*handler)(int));
-int win32_interruptible(void);
-void win32_thread_resume_main(void);
-void win32_sleep(unsigned long msec);
-#define Sleep(msec) win32_sleep(msec)
+int win32_sleep(unsigned long msec);
+void win32_enter_syscall(void);
+void win32_leave_syscall(void);
+void win32_disable_interrupt(void);
+void win32_enable_interrupt(void);
+#define Sleep(msec) (void)win32_sleep(msec)
+
+/*
+== ***CAUTION***
+Since this function is very dangerous, ((*NEVER*))
+* lock any HANDLEs(i.e. Mutex, Semaphore, CriticalSection and so on) or,
+* use anything like TRAP_BEG...TRAP_END block structure,
+in asynchronous_func_t.
+*/
+typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv);
+DWORD win32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval);
#endif