Lines Matching refs:sel
958 static int selscan(struct proc *p, struct _select * sel,
986 struct _select *sel;
992 sel = &uth->uu_select;
1020 if (sel->nbytes < (3 * ni)) {
1024 if (sel->ibits != NULL)
1025 FREE(sel->ibits, M_TEMP);
1026 if (sel->obits != NULL) {
1027 FREE(sel->obits, M_TEMP);
1029 sel->obits = NULL;
1032 MALLOC(sel->ibits, u_int32_t *, nbytes, M_TEMP, M_WAITOK | M_ZERO);
1033 if (sel->ibits == NULL)
1035 MALLOC(sel->obits, u_int32_t *, nbytes, M_TEMP, M_WAITOK | M_ZERO);
1036 if (sel->obits == NULL) {
1037 FREE(sel->ibits, M_TEMP);
1038 sel->ibits = NULL;
1041 sel->nbytes = nbytes;
1046 bzero((caddr_t)sel->ibits, sel->nbytes);
1047 bzero((caddr_t)sel->obits, sel->nbytes);
1056 (caddr_t)&sel->ibits[(x) * nw], ni))) \
1087 tvtoabstime(&atv), &sel->abstime);
1090 sel->abstime = 0;
1092 if ( (error = selcount(p, sel->ibits, uap->nd, &count)) ) {
1096 sel->count = count;
1116 sel->wql = (char *)uth->uu_wqset + SIZEOF_WAITQUEUE_SET;
1157 struct _select *sel;
1169 sel = &uth->uu_select;
1173 if (sel->count == 0)
1184 if (sel->count) {
1192 error = selscan(p, sel, uap->nd, retval, sel_pass, (wait_queue_sub_t)uth->uu_wqset);
1213 if (now >= sel->abstime)
1228 if (uap->tv && sel->abstime == 0) {
1241 if (sel->count &&(sel_pass == SEL_SECONDPASS))
1246 NULL, THREAD_ABORTSAFE, sel->abstime);
1265 seldrop(p, sel->ibits, uap->nd);
1279 copyout((caddr_t)&sel->obits[(x) * nw], uap->name, ni))) \
1299 * sel The per-thread select context structure
1312 selscan(struct proc *p, struct _select *sel, int nfd, int32_t *retval,
1338 ibits = sel->ibits;
1339 obits = sel->obits;
1340 wql = sel->wql;
1344 count = sel->count;