source: rtems/cpukit/posix/src/sigwait.c @ 188c82b

4.104.114.84.95
Last change on this file since 188c82b was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 760 bytes
Line 
1/*
2 *  3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
3 *
4 *  NOTE: P1003.1c/D10, p. 39 adds sigwait().
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16
17#include <pthread.h>
18#include <signal.h>
19#include <errno.h>
20
21#include <rtems/system.h>
22#include <rtems/posix/pthread.h>
23#include <rtems/posix/psignal.h>
24
25int sigwait(
26  const sigset_t  *set,
27  int             *sig
28)
29{
30  int status;
31
32  status = sigtimedwait( set, NULL, NULL );
33
34  if ( status != -1 ) {
35    if ( sig )
36      *sig = status;
37    return 0;
38  }
39
40  return errno;
41}
42
Note: See TracBrowser for help on using the repository browser.