blob: 46b4714b84631b5aaf20d71277fab77a8b7a5271 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <lemon/syscall.h>
#include <sys/types.h>
#include <mlibc/ansi-sysdeps.hpp>
namespace mlibc{
int sys_sigprocmask(int how, const sigset_t *__restrict set,
sigset_t *__restrict retrieve){
int ret = syscall(SYS_SIGPROCMASK, how, set, retrieve);
if(ret < 0){
return -ret;
}
return 0;
}
int sys_sigaction(int signal, const struct sigaction *__restrict action,
struct sigaction *__restrict oldAction) {
int ret = syscall(SYS_SIGNAL_ACTION, signal, action, oldAction);
if(ret < 0){
return -ret;
}
return 0;
}
int sys_kill(int pid, int signal){
int ret = syscall(SYS_KILL, pid, signal);
if(ret < 0){
return -ret;
}
return 0;
}
}
|