Two sequential calls to _thread_Enable_dispatch() ?!

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Sat Dec 17 19:40:19 UTC 2005


Alex wrote:
> Hi all,
> 
> Please look to the mqueueopen.c file.
> 
> Why there are 2 sequential calls to _thread_Enable_dispatch() function in the mq_open() POSIX.4 primitive?
> 
> Are they necessary? Does one call to _thread_Enable_dispatch() is not enough?
> 
> 
> If there is configured extensions, each call to _thread_Enable_dispatch() will execute the exensions. Thus we are delaying the execution time of the mq_open() primitive, right?
> 
> Sorry, I am confused...
> 
> Can you help me?
> 
> Many thanks,

Unusual case and probably needs a better comment.  But it is needed. 
There is a _Thread_Disable_dispatch() at line 57 and at line 112, the
call to _POSIX_Message_queue_Get() again implicitly increments it.

I suppose the first call could be a _Thread_Unnest_dispatch to indicate
that it was intentional.  Even better might be comments indicating where
the nest level goes to 2 and back down to 1.



-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list