summaryrefslogblamecommitdiff
path: root/src/signal/sigandset.c
blob: e0c6f4867f9037eea8fd3f108acbddb290dd49e5 (plain) (tree)
1
2
3
4
5
6
7

                   
 
                                       


                                                              




                                                                                      
#define _GNU_SOURCE
#include <signal.h>

#define SST_SIZE (_NSIG/8/sizeof(long))

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;
}