source: rtems/cpukit/posix/src/sigsuspend.c @ 07d880f4

4.104.114.84.95
Last change on this file since 07d880f4 was 07d880f4, checked in by Joel Sherrill <joel.sherrill@…>, on 01/31/99 at 20:45:31

Split psignal.c into many more files. This reduced the amount of
object code that has to be loaded just for initializing the signal
manager.

  • Property mode set to 100644
File size: 1004 bytes
Line 
1/*
2 *  3.3.7 Wait for a Signal, P1003.1b-1993, p. 75
3 *
4 *  COPYRIGHT (c) 1989-1998.
5 *  On-Line Applications Research Corporation (OAR).
6 *  Copyright assigned to U.S. Government, 1994.
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15
16#include <signal.h>
17#include <errno.h>
18
19#include <rtems/system.h>
20#include <rtems/posix/pthread.h>
21#include <rtems/posix/psignal.h>
22
23int sigsuspend(
24  const sigset_t  *sigmask
25)
26{
27  sigset_t            saved_signals_blocked;
28  sigset_t            all_signals;
29  int                 status;
30  POSIX_API_Control  *api;
31
32  api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
33
34  status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
35
36  (void) sigfillset( &all_signals );
37
38  status = sigtimedwait( &all_signals, NULL, NULL );
39
40  (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
41
42  return status;
43}
Note: See TracBrowser for help on using the repository browser.