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: Support for POSIX SIGEV_THREAD notifications (take 2)


Ooops.  The previous patch needed one last tweak in order to compile
properly with the SIGEV_THREAD support disabled.  My apologies.

Attached is the updated patch.  The only differences between this one
and the last one are:

1) The section in cyg_sigqueue (signal.cxx:424) was changed to not call
the SIGEV_THREAD processing function if SIGEV_THREAD processing is not
enabled.

2) The signal4.c test was changed to be "not applicable" if
SIGEV_THREAD processing is not enabled.

--
Dan Jakubiec
Systech Corp


--- Dan Jakubiec <djakubiec@yahoo.com> wrote:
> Attached for your review is a patch that adds SIGEV_THREAD support to
> the POSIX signal delivery subsystem.  By default, this functionality
> will be disabled.  An overview of the enhancement is as follows:
>                                                                      
>  
>                                
> 1) SIGEV_THREAD notifications are generated using the sigevent
> signalling mechanism.  Since these notifications create threads, they
> must be processed from thread context.
>                                                                      
>  
>                                
> 2) Since signal events can often occur in DSR contexts, a system
> thread
> is started at boot time to process the SIGEV_THREAD requests.
>                                                                      
>  
>                                
> 3) Currently, the only way to generate SIGEV_THREAD notifications is
> via POSIX timers and POSIX message queues.
>                                                                      
>  
>                                
> 4) A general-purpose support function ( cyg_posix_sigev_queue() ) was
> created and exported to allow DSR's to schedule signal delivery.  It
> processes SIGEV_SIGNAL and SIGEV_THREAD notifications.
>                                                                      
>  
>                                
> 
> Some other unrelated changes:
>                                                                      
>  
>                                
> 1) Overrun counting for the timer_getoverrun() function was fixed. 
> Currently, it clears the overrun count as soon as signal delivery is
> scheduled.  This will cause signal handlers that call
> timer_getoverrun() to always read 0 overruns.
>                                                                      
>  
>                                
> 2) Modified pthread_create() to NULL-terminate the thread name it
> generates.  This name is only used for debugging purposes, but should
> be NULL terminated.
>                                                                      
>  
>                                
>                                                                      
>  
>                                
> Also attached is a new file that belongs in
> ecos/packages/compat/posix/current/tests/signal4.c to test this
> functionality.  Unfortunately, I couldn't figure out how to get it
> into
> the patch file.
> 
> As always, your comments are appreciated.
>                                                                      
>  
>                                
> --
> Dan Jakubiec
> Systech Corp
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/

> ATTACHMENT part 2 application/octet-stream name=sigev_thread.pat


> ATTACHMENT part 3 application/octet-stream name=signal4.c

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Attachment: sigev_thread2.pat
Description: sigev_thread2.pat

Attachment: signal4.c
Description: signal4.c


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