mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
parent
7186c45de6
commit
b9c234a341
@ -14,7 +14,8 @@ SRC_CC = atexit.cc dummies.cc rlimit.cc sysctl.cc \
|
|||||||
gettimeofday.cc malloc.cc progname.cc fd_alloc.cc file_operations.cc \
|
gettimeofday.cc malloc.cc progname.cc fd_alloc.cc file_operations.cc \
|
||||||
plugin.cc plugin_registry.cc select.cc exit.cc environ.cc nanosleep.cc \
|
plugin.cc plugin_registry.cc select.cc exit.cc environ.cc nanosleep.cc \
|
||||||
libc_mem_alloc.cc pread_pwrite.cc readv_writev.cc poll.cc \
|
libc_mem_alloc.cc pread_pwrite.cc readv_writev.cc poll.cc \
|
||||||
libc_pdbg.cc vfs_plugin.cc rtc.cc dynamic_linker.cc socket_operations.cc
|
libc_pdbg.cc vfs_plugin.cc rtc.cc dynamic_linker.cc signal.cc \
|
||||||
|
socket_operations.cc
|
||||||
|
|
||||||
INC_DIR += $(REP_DIR)/src/lib/libc
|
INC_DIR += $(REP_DIR)/src/lib/libc
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ extern "C" {
|
|||||||
|
|
||||||
#include <db.h>
|
#include <db.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
@ -118,8 +117,6 @@ DUMMY(int , -1, _sigaction, (int, const struct sigaction *, struct sigaction *
|
|||||||
DUMMY(int , -1, sigaction, (int, const struct sigaction *, struct sigaction *))
|
DUMMY(int , -1, sigaction, (int, const struct sigaction *, struct sigaction *))
|
||||||
DUMMY(int , -1, sigblock, (int))
|
DUMMY(int , -1, sigblock, (int))
|
||||||
DUMMY(int , -1, sigpause, (int))
|
DUMMY(int , -1, sigpause, (int))
|
||||||
DUMMY(int , -1, _sigprocmask, (int, const sigset_t *, sigset_t *))
|
|
||||||
DUMMY(int , -1, sigprocmask, (int, const sigset_t *, sigset_t *))
|
|
||||||
DUMMY(int , -1, _sigsuspend, (const sigset_t *))
|
DUMMY(int , -1, _sigsuspend, (const sigset_t *))
|
||||||
DUMMY(int , -1, sigsuspend, (const sigset_t *))
|
DUMMY(int , -1, sigsuspend, (const sigset_t *))
|
||||||
DUMMY(int , -1, socketpair, (int, int, int, int *))
|
DUMMY(int , -1, socketpair, (int, int, int, int *))
|
||||||
|
43
repos/libports/src/lib/libc/signal.cc
Normal file
43
repos/libports/src/lib/libc/signal.cc
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* \brief POSIX signals
|
||||||
|
* \author Emery Hemingway
|
||||||
|
* \date 2015-10-30
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2006-2015 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU General Public License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* libc includes */
|
||||||
|
extern "C" {
|
||||||
|
#include <signal.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <errno.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" int __attribute__((weak)) sigprocmask(int how, const sigset_t *set, sigset_t *old_set)
|
||||||
|
{
|
||||||
|
/* no signals should be expected, so report all signals blocked */
|
||||||
|
if (old_set != NULL)
|
||||||
|
sigfillset(old_set);
|
||||||
|
|
||||||
|
if (set == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switch (how) {
|
||||||
|
case SIG_BLOCK: return 0;
|
||||||
|
case SIG_SETMASK: return 0;
|
||||||
|
case SIG_UNBLOCK: return 0;
|
||||||
|
}
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" int __attribute__((weak)) _sigprocmask(int how, const sigset_t *set, sigset_t *old_set)
|
||||||
|
{
|
||||||
|
return sigprocmask(how, set, old_set);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user