source: rtems/cpukit/posix/src/sigwait.c @ 8f6b7b51

4.104.115
Last change on this file since 8f6b7b51 was 3239698, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/15/04 at 13:26:21

Remove stray white spaces.

  • Property mode set to 100644
File size: 799 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.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <pthread.h>
21#include <signal.h>
22#include <errno.h>
23
24#include <rtems/system.h>
25#include <rtems/posix/pthread.h>
26#include <rtems/posix/psignal.h>
27
28int sigwait(
29  const sigset_t  *set,
30  int             *sig
31)
32{
33  int status;
34
35  status = sigtimedwait( set, NULL, NULL );
36
37  if ( status != -1 ) {
38    if ( sig )
39      *sig = status;
40    return 0;
41  }
42
43  return errno;
44}
Note: See TracBrowser for help on using the repository browser.