about summary refs log tree commit diff
path: root/src/signal/sigandset.c
blob: f9204c49ff605c9a4fa28c2872cf7d937233d189 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#define _GNU_SOURCE
#include <signal.h>

#define SST_SIZE (_NSIG/8)

int sigandset(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;
}