1 /* $NetBSD: svc_fdset.c,v 1.1 2013/03/05 19:55:23 christos Exp $ */
4 __RCSID("$NetBSD: svc_fdset.c,v 1.1 2013/03/05 19:55:23 christos Exp $");
9 #include <sys/select.h>
11 #include "svc_fdset.h"
13 static pthread_key_t fdsetkey
;
14 static pthread_key_t fdmaxkey
;
15 static fd_set thefdset
;
22 pthread_key_create(&fdsetkey
, NULL
);
23 pthread_key_create(&fdmaxkey
, NULL
);
32 fdsetti
= malloc(sizeof(*fdsetti
));
33 memset(fdsetti
, 0, sizeof(*fdsetti
));
34 pthread_setspecific(fdsetkey
, fdsetti
);
36 fdmax
= malloc(sizeof(*fdmax
));
37 memset(fdmax
, 0, sizeof(*fdmax
));
38 pthread_setspecific(fdmaxkey
, fdmax
);
46 rv
= pthread_getspecific(fdsetkey
);
58 rv
= pthread_getspecific(fdmaxkey
);