repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
headers/bsd: Add sys/queue.h.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
unistd
/
pause.c
blob
757d184accb442f8a5422aa2065c23677ff7eac1
1
/*
2
* Copyright (c) 2005, Haiku Project. All rights reserved.
3
* Distributed under the terms of the MIT license.
4
*
5
* Author(s):
6
* Jérôme Duval
7
*/
8
9
10
#include <syscalls.h>
11
12
#include <errno.h>
13
#include <pthread.h>
14
#include <signal.h>
15
16
#include <errno_private.h>
17
18
19
int
20
pause
(
void
)
21
{
22
sigset_t mask
;
23
sigemptyset
(&
mask
);
24
25
__set_errno
(
_kern_sigsuspend
(&
mask
));
26
27
pthread_testcancel
();
28
29
return
-
1
;
30
}
31