} _Jv_Mutex_t;
-typedef struct
+typedef struct _Jv_Thread_t
{
int flags; // Flags are defined in implementation.
HANDLE handle; // Actual handle to the thread
// 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
#undef interface
#undef STRICT
#undef VOID
+#undef TEXT
+#undef OUT
#endif /* __JV_WIN32_THREADS__ */