This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CYG_FLAG_WAITMODE_CLR documentation


Andrew Lunn <andrew@lunn.ch> writes:

> Hi Nick
> 
> Could you take a quick look at this proposed documentation
> extension. It was not clear to me from the documentation how
> CYG_FLAG_WAITMODE_CLR worked with respect to multiple threads calling
> cyg_flag_wait(). I think this makes it clearer.

It looks OK to me. There was just one small typo which I have pointed
out below. Go ahead and check it in.


> 
>     Thanks
>         Andrew                 
> 
> Index: kernel/current//ChangeLog
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
> retrieving revision 1.117
> diff -u -r1.117 ChangeLog
> --- kernel/current//ChangeLog	27 Mar 2004 18:19:57 -0000	1.117
> +++ kernel/current//ChangeLog	11 Apr 2004 13:47:12 -0000
> @@ -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
> Index: kernel/current//doc/kernel.sgml
> ===================================================================
> RCS file: /cvs/ecos/ecos/packages/kernel/current/doc/kernel.sgml,v
> retrieving revision 1.10
> diff -u -r1.10 kernel.sgml
> --- kernel/current//doc/kernel.sgml	4 Mar 2004 02:17:55 -0000	1.10
> +++ kernel/current//doc/kernel.sgml	11 Apr 2004 13:47:22 -0000
> @@ -3822,8 +3822,17 @@
>        <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 there wake condition fulfilled. If the awoken thread
                          ^^^^^
                          their
> +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

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]