Simplified sigsuspend() a bit.
Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14460 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7d9e0897ed
commit
f3bb653937
@ -1,15 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the Haiku license.
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
int
|
||||
sigpending(sigset_t *set)
|
||||
{
|
||||
|
@ -1,23 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the Haiku license.
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
int
|
||||
sigsuspend(const sigset_t *mask)
|
||||
{
|
||||
int err = _kern_sigsuspend(mask);
|
||||
if (err < B_OK) {
|
||||
errno = err;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
errno = _kern_sigsuspend(mask);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1,21 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the Haiku license.
|
||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
* Author(s):
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
|
||||
#include <syscalls.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <syscalls.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
int
|
||||
pause()
|
||||
pause(void)
|
||||
{
|
||||
sigset_t mask;
|
||||
sigemptyset(&mask);
|
||||
|
||||
errno = _kern_sigsuspend(&mask);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user