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 17 int 18 pause(void) 19 { 20 sigset_t mask; 21 sigemptyset(&mask); 22 23 errno = _kern_sigsuspend(&mask); 24 25 pthread_testcancel(); 26 27 return -1; 28 } 29 30