sigorset.c 273 字节
Newer Older
1 2 3
#define _GNU_SOURCE
#include <signal.h>

R
rofl0r 已提交
4
#define SST_SIZE (_NSIG/8)
5 6 7 8 9 10 11 12

int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right)
{
	unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
	for(; i < SST_SIZE; i++) d[i] = l[i] | r[i];
	return 0;
}