From f3bb653937bb3a05a8d01daa506b27fc8a4998b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 20 Oct 2005 18:38:30 +0000 Subject: [PATCH] Simplified sigsuspend() a bit. Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14460 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/signal/sigpending.c | 13 +++++++----- src/system/libroot/posix/signal/sigsuspend.c | 21 ++++++++++---------- src/system/libroot/posix/unistd/pause.c | 17 +++++++++------- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/system/libroot/posix/signal/sigpending.c b/src/system/libroot/posix/signal/sigpending.c index 2e186d445b..1c15f3bc5e 100644 --- a/src/system/libroot/posix/signal/sigpending.c +++ b/src/system/libroot/posix/signal/sigpending.c @@ -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 + #include + +#include #include + int sigpending(sigset_t *set) { diff --git a/src/system/libroot/posix/signal/sigsuspend.c b/src/system/libroot/posix/signal/sigsuspend.c index 35e7c0f35e..8fcfba756f 100644 --- a/src/system/libroot/posix/signal/sigsuspend.c +++ b/src/system/libroot/posix/signal/sigsuspend.c @@ -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 + #include + +#include #include + 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; } diff --git a/src/system/libroot/posix/unistd/pause.c b/src/system/libroot/posix/unistd/pause.c index 73e9e26f10..7a716b2e43 100644 --- a/src/system/libroot/posix/unistd/pause.c +++ b/src/system/libroot/posix/unistd/pause.c @@ -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 + #include #include -#include -#include + int -pause() +pause(void) { sigset_t mask; sigemptyset(&mask); + errno = _kern_sigsuspend(&mask); return -1; }