dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/include il_thread.h,1.9,1.10


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/include il_thread.h,1.9,1.10
Date: Sat, 15 Feb 2003 05:11:46 -0500

Update of /cvsroot/dotgnu-pnet/pnet/include
In directory subversions:/tmp/cvs-serv6021/include

Modified Files:
        il_thread.h 
Log Message:


Implement the primitives for monitor operations.


Index: il_thread.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_thread.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** il_thread.h 7 Dec 2002 10:46:55 -0000       1.9
--- il_thread.h 15 Feb 2003 10:11:43 -0000      1.10
***************
*** 334,337 ****
--- 334,369 ----
  
  /*
+  * Create a wait handle that corresponds to a monitor.
+  */
+ ILWaitHandle *ILWaitMonitorCreate(void);
+ 
+ /*
+  * Wait on a monitor for a "pulse" operation.  Returns zero if we
+  * don't own the monitor, 1 if waiting, or an "IL_WAIT_*" error
+  * code otherwise.
+  */
+ int ILWaitMonitorWait(ILWaitHandle *handle, ILUInt32 timeout);
+ 
+ /*
+  * Pulse a single waiting thread on a monitor.
+  */
+ int ILWaitMonitorPulse(ILWaitHandle *handle);
+ 
+ /*
+  * Pulse all waiting threads on a monitor.
+  */
+ int ILWaitMonitorPulseAll(ILWaitHandle *handle);
+ 
+ /*
+  * Syntactic sugar.
+  */
+ #define       ILWaitMonitorEnter(monitor)             \
+                       (ILWaitOne((monitor), IL_WAIT_INFINITE))
+ #define       ILWaitMonitorTryEnter(monitor,timeout)          \
+                       (ILWaitOne((monitor), (timeout)))
+ #define       ILWaitMonitorLeave(monitor)             \
+                       (ILWaitMutexRelease((monitor)))
+ 
+ /*
   * Wait Event definitions
   *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]