OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [sigwait.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: sigwait.c,v 1.2 2001-09-27 11:59:17 chris Exp $
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
 
25
int 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.