summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bbee7e1)
SCCS-vsn: sys/kern/kern_descrip.c 5.15
-/* kern_descrip.c 5.14 82/10/20 */
+/* kern_descrip.c 5.15 82/10/22 */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
int s, ncoll;
label_t lqsave;
int s, ncoll;
label_t lqsave;
+ obits[0] = obits[1] = obits[2] = 0;
if (uap->nd >= NOFILE) {
u.u_error = EINVAL;
if (uap->nd >= NOFILE) {
u.u_error = EINVAL;
}
#define getbits(name, x) \
}
#define getbits(name, x) \
if (copyin((caddr_t)uap->name, (caddr_t)&ibits[x], \
sizeof (ibits[x]))) { \
u.u_error = EFAULT; \
if (copyin((caddr_t)uap->name, (caddr_t)&ibits[x], \
sizeof (ibits[x]))) { \
u.u_error = EFAULT; \
} \
} else \
ibits[x] = 0;
} \
} else \
ibits[x] = 0;
if (uap->tv) {
if (copyin((caddr_t)uap->tv, (caddr_t)&atv, sizeof (atv))) {
u.u_error = EFAULT;
if (uap->tv) {
if (copyin((caddr_t)uap->tv, (caddr_t)&atv, sizeof (atv))) {
u.u_error = EFAULT;
}
if (itimerfix(&atv)) {
u.u_error = EINVAL;
}
if (itimerfix(&atv)) {
u.u_error = EINVAL;
}
s = spl7(); timevaladd(&atv, &time); splx(s);
}
}
s = spl7(); timevaladd(&atv, &time); splx(s);
}
ncoll = nselcoll;
u.u_procp->p_flag |= SSEL;
u.u_r.r_val1 = selscan(ibits, obits);
ncoll = nselcoll;
u.u_procp->p_flag |= SSEL;
u.u_r.r_val1 = selscan(ibits, obits);
- if (u.u_error)
- return;
- if (u.u_r.r_val1)
+ if (u.u_error || u.u_r.r_val1)
goto done;
s = spl6();
if (uap->tv && timercmp(&time, &atv, >=)) {
goto done;
s = spl6();
if (uap->tv && timercmp(&time, &atv, >=)) {
untimeout(unselect, (caddr_t)u.u_procp);
u.u_error = EINTR;
splx(s);
untimeout(unselect, (caddr_t)u.u_procp);
u.u_error = EINTR;
splx(s);
}
timeout(unselect, (caddr_t)u.u_procp, hzto(&atv));
}
}
timeout(unselect, (caddr_t)u.u_procp, hzto(&atv));
}
#define putbits(name, x) \
if (uap->name) { \
if (copyout((caddr_t)obits[x], (caddr_t)uap->name, \
#define putbits(name, x) \
if (uap->name) { \
if (copyout((caddr_t)obits[x], (caddr_t)uap->name, \
- sizeof (obits[x]))) { \
}
putbits(in, 0);
putbits(ou, 1);
}
putbits(in, 0);
putbits(ou, 1);