diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-02-10 17:03:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-02-10 17:03:46 +0000 |
commit | aee3d6896ab728aa9270377bdb6cb5efe21e9144 (patch) | |
tree | 00439ecb9712bc4f03210d3f2fbb5e83ad970096 | |
parent | Comments fixed after problem report from Ian Lance Taylor <ian@airs.com>. (diff) | |
download | rtems-aee3d6896ab728aa9270377bdb6cb5efe21e9144.tar.bz2 |
POSIX timer support modifications.
-rw-r--r-- | c/src/exec/posix/src/pthreadkill.c | 6 | ||||
-rw-r--r-- | c/src/exec/posix/src/sigaction.c | 6 | ||||
-rw-r--r-- | c/src/exec/posix/src/sigtimedwait.c | 8 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadkill.c | 6 | ||||
-rw-r--r-- | cpukit/posix/src/sigaction.c | 6 | ||||
-rw-r--r-- | cpukit/posix/src/sigtimedwait.c | 8 |
6 files changed, 32 insertions, 8 deletions
diff --git a/c/src/exec/posix/src/pthreadkill.c b/c/src/exec/posix/src/pthreadkill.c index 652b3554a1..85fe4a35bb 100644 --- a/c/src/exec/posix/src/pthreadkill.c +++ b/c/src/exec/posix/src/pthreadkill.c @@ -34,12 +34,10 @@ int pthread_kill( if ( sig && !is_valid_signo(sig) ) set_errno_and_return_minus_one( EINVAL ); +/* commented out when posix timers added if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) set_errno_and_return_minus_one( ENOSYS ); - - /* - * RTEMS does not support sending a siginfo signal to a specific thread. - */ +*/ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { diff --git a/c/src/exec/posix/src/sigaction.c b/c/src/exec/posix/src/sigaction.c index a2d709e8e7..26abb4ff86 100644 --- a/c/src/exec/posix/src/sigaction.c +++ b/c/src/exec/posix/src/sigaction.c @@ -22,6 +22,12 @@ #include <rtems/posix/seterr.h> #include <rtems/score/isr.h> +/* + * PARAMETERS_PASSING_S is defined in ptimer.c + */ + +extern void PARAMETERS_PASSING_S (int num_signal, const struct sigaction inf); + int sigaction( int sig, const struct sigaction *act, diff --git a/c/src/exec/posix/src/sigtimedwait.c b/c/src/exec/posix/src/sigtimedwait.c index bb35dd30d7..87bb0ff372 100644 --- a/c/src/exec/posix/src/sigtimedwait.c +++ b/c/src/exec/posix/src/sigtimedwait.c @@ -112,6 +112,14 @@ int sigtimedwait( _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); _Thread_Enable_dispatch(); + /* + * When the thread is set free by a signal, it is need to eliminate + * the signal. + */ + + _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, + FALSE, FALSE ); + errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c index 652b3554a1..85fe4a35bb 100644 --- a/cpukit/posix/src/pthreadkill.c +++ b/cpukit/posix/src/pthreadkill.c @@ -34,12 +34,10 @@ int pthread_kill( if ( sig && !is_valid_signo(sig) ) set_errno_and_return_minus_one( EINVAL ); +/* commented out when posix timers added if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) set_errno_and_return_minus_one( ENOSYS ); - - /* - * RTEMS does not support sending a siginfo signal to a specific thread. - */ +*/ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c index a2d709e8e7..26abb4ff86 100644 --- a/cpukit/posix/src/sigaction.c +++ b/cpukit/posix/src/sigaction.c @@ -22,6 +22,12 @@ #include <rtems/posix/seterr.h> #include <rtems/score/isr.h> +/* + * PARAMETERS_PASSING_S is defined in ptimer.c + */ + +extern void PARAMETERS_PASSING_S (int num_signal, const struct sigaction inf); + int sigaction( int sig, const struct sigaction *act, diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c index bb35dd30d7..87bb0ff372 100644 --- a/cpukit/posix/src/sigtimedwait.c +++ b/cpukit/posix/src/sigtimedwait.c @@ -112,6 +112,14 @@ int sigtimedwait( _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); _Thread_Enable_dispatch(); + /* + * When the thread is set free by a signal, it is need to eliminate + * the signal. + */ + + _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, + FALSE, FALSE ); + errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } |