diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
commit | 97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/include/win32-threads.h | |
parent | c648dedbde727ca3f883bb5fd773aa4af70d3369 (diff) | |
download | gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.zip gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.gz gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.bz2 |
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/include/win32-threads.h')
-rw-r--r-- | libjava/include/win32-threads.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libjava/include/win32-threads.h b/libjava/include/win32-threads.h index 0b22010..442149c 100644 --- a/libjava/include/win32-threads.h +++ b/libjava/include/win32-threads.h @@ -193,6 +193,28 @@ void _Jv_ThreadInterrupt (_Jv_Thread_t *data); // See java/lang/natWin32Process.cc (waitFor) for an example. HANDLE _Jv_Win32GetInterruptEvent (void); +// park() / unpark() support + +struct ParkHelper +{ + // We use LONG instead of obj_addr_t to avoid pulling in locks.h, + // which depends on size_t, ... + volatile LONG permit; + + // The critical section is used for lazy initialization of our event + CRITICAL_SECTION cs; + HANDLE event; + + void init (); + void deactivate (); + void destroy (); + void park (jboolean isAbsolute, jlong time); + void unpark (); + +private: + void init_event(); +}; + // Remove defines from <windows.h> that conflict with various things in libgcj code #undef TRUE @@ -204,5 +226,6 @@ HANDLE _Jv_Win32GetInterruptEvent (void); #undef interface #undef STRICT #undef VOID +#undef TEXT #endif /* __JV_WIN32_THREADS__ */ |