changeset 1585:eead27d1aa2f

* doc/kernel.sgml: Expanded the documentation about the use of CYG_FLAG_WAITMODE_CLR.
author asl
date Wed, 14 Apr 2004 09:32:03 +0000
parents 02c0aa987107
children e0d88dc6a92f
files packages/kernel/current/ChangeLog packages/kernel/current/doc/kernel.sgml packages/kernel/current/include/thread.hxx
diffstat 3 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/packages/kernel/current/ChangeLog
+++ b/packages/kernel/current/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-11  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* doc/kernel.sgml: Expanded the documentation about the use of
+	CYG_FLAG_WAITMODE_CLR.
+
 2004-03-27  Sebastien Couret	<sebastien.couret@elios-informatique.fr>
 
 	* src/debug/dbg-thread-demux.c (dbg_thread_syscall_rmt): Only
--- a/packages/kernel/current/doc/kernel.sgml
+++ b/packages/kernel/current/doc/kernel.sgml
@@ -3822,8 +3822,17 @@ with a value of 0.
       <para>
 <function>cyg_flag_setbits</function> is called by a producer thread
 or from inside a DSR when an event occurs. The specified bits are or'd
-into the current event flag value. This may cause a waiting thread to
-be woken up, if its condition is now satisfied.
+into the current event flag value. This may cause one or more waiting 
+threads to be woken up, if their conditions are now satisfied. How many 
+threads are awoken depends on the use of <literal>CYG_FLAG_WAITMODE_CLR
+</literal>. The queue of threads waiting on the flag is walked to find 
+threads which now have their wake condition fulfilled. If the awoken thread 
+has passed <literal>CYG_FLAG_WAITMODE_CLR</literal> the walking of the queue 
+is terminated, otherwise the walk continues. Thus if no threads have passed 
+<literal>CYG_FLAG_WAITMORE_CLR</literal> all threads with fulfilled 
+conditions will be awoken. If <literal>CYG_FLAG_WAITMODE_CLR</literal> is 
+passed by threads with fulfilled conditions, the number of awoken threads 
+will depend on the order the threads are in the queue.
       </para>
       <para>
 <function>cyg_flag_maskbits</function> can be used to clear one or
--- a/packages/kernel/current/include/thread.hxx
+++ b/packages/kernel/current/include/thread.hxx
@@ -562,7 +562,7 @@ public:
     void                remove(Cyg_Thread *thread);
 
                         // test if queue is empty
-    cyg_bool            empty();
+    inline cyg_bool     empty();
     
 };