OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [linux/] [linuxthreads/] [restart.h] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Linuxthreads - a simple clone()-based implementation of Posix        */
2
/* threads for Linux.                                                   */
3
/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)              */
4
/*                                                                      */
5
/* This program is free software; you can redistribute it and/or        */
6
/* modify it under the terms of the GNU Library General Public License  */
7
/* as published by the Free Software Foundation; either version 2       */
8
/* of the License, or (at your option) any later version.               */
9
/*                                                                      */
10
/* This program is distributed in the hope that it will be useful,      */
11
/* but WITHOUT ANY WARRANTY; without even the implied warranty of       */
12
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        */
13
/* GNU Library General Public License for more details.                 */
14
 
15
#include <signal.h>
16
#include <kernel-features.h>
17
 
18
/* Primitives for controlling thread execution */
19
 
20
static inline void restart(pthread_descr th)
21
{
22
  /* See pthread.c */
23
#if __ASSUME_REALTIME_SIGNALS
24
  __pthread_restart_new(th);
25
#else
26
  __pthread_restart(th);
27
#endif
28
}
29
 
30
static inline void suspend(pthread_descr self)
31
{
32
  /* See pthread.c */
33
#if __ASSUME_REALTIME_SIGNALS
34
  __pthread_wait_for_restart_signal(self);
35
#else
36
  __pthread_suspend(self);
37
#endif
38
}
39
 
40
static inline int timedsuspend(pthread_descr self,
41
                const struct timespec *abstime)
42
{
43
  /* See pthread.c */
44
#if __ASSUME_REALTIME_SIGNALS
45
  return __pthread_timedsuspend_new(self, abstime);
46
#else
47
  return __pthread_timedsuspend(self, abstime);
48
#endif
49
}

powered by: WebSVN 2.1.0

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