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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [semtimedwait.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*
2 208 chris
 *  $Id: semtimedwait.c,v 1.2 2001-09-27 11:59:17 chris Exp $
3 158 chris
 */
4
 
5
#include <stdarg.h>
6
 
7
#include <errno.h>
8
#include <fcntl.h>
9
#include <pthread.h>
10
#include <semaphore.h>
11
#include <limits.h>
12
 
13
#include <rtems/system.h>
14
#include <rtems/score/object.h>
15
#include <rtems/posix/semaphore.h>
16
#include <rtems/posix/time.h>
17
#include <rtems/posix/seterr.h>
18
 
19
/*PAGE
20
 *
21
 *  11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
22
 *
23
 *  NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
24
 */
25
 
26
int sem_timedwait(
27
  sem_t                 *sem,
28
  const struct timespec *timeout
29
)
30
{
31
  return _POSIX_Semaphore_Wait_support(
32
    sem,
33
    TRUE,
34
    _POSIX_Timespec_to_interval( timeout )
35
  );
36
}

powered by: WebSVN 2.1.0

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