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.
|
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||||
* Distributed under the terms of the Haiku license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author(s):
|
* Author(s):
|
||||||
* Jérôme Duval
|
* Jérôme Duval
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sigpending(sigset_t *set)
|
sigpending(sigset_t *set)
|
||||||
{
|
{
|
||||||
|
@ -1,23 +1,22 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||||
* Distributed under the terms of the Haiku license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author(s):
|
* Author(s):
|
||||||
* Jérôme Duval
|
* Jérôme Duval
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sigsuspend(const sigset_t *mask)
|
sigsuspend(const sigset_t *mask)
|
||||||
{
|
{
|
||||||
int err = _kern_sigsuspend(mask);
|
errno = _kern_sigsuspend(mask);
|
||||||
if (err < B_OK) {
|
|
||||||
errno = err;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
* Copyright (c) 2005, Haiku Project. All rights reserved.
|
||||||
* Distributed under the terms of the Haiku license.
|
* Distributed under the terms of the MIT license.
|
||||||
*
|
*
|
||||||
* Author(s):
|
* Author(s):
|
||||||
* Jérôme Duval
|
* Jérôme Duval
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <syscalls.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <syscalls.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pause()
|
pause(void)
|
||||||
{
|
{
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
sigemptyset(&mask);
|
sigemptyset(&mask);
|
||||||
|
|
||||||
errno = _kern_sigsuspend(&mask);
|
errno = _kern_sigsuspend(&mask);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user