Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/sys_generic.c
Show First 20 Lines • Show All 1,602 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
} | } | ||||
FILEDESC_SUNLOCK(fdp); | FILEDESC_SUNLOCK(fdp); | ||||
td->td_retval[0] = n; | td->td_retval[0] = n; | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* OpenBSD poll system call. | |||||
* | |||||
* XXX this isn't quite a true representation.. OpenBSD uses select ops. | |||||
*/ | |||||
#ifndef _SYS_SYSPROTO_H_ | |||||
struct openbsd_poll_args { | |||||
struct pollfd *fds; | |||||
u_int nfds; | |||||
int timeout; | |||||
}; | |||||
#endif | |||||
int | |||||
sys_openbsd_poll(td, uap) | |||||
register struct thread *td; | |||||
register struct openbsd_poll_args *uap; | |||||
{ | |||||
return (sys_poll(td, (struct poll_args *)uap)); | |||||
} | |||||
/* | |||||
* XXX This was created specifically to support netncp and netsmb. This | * XXX This was created specifically to support netncp and netsmb. This | ||||
* allows the caller to specify a socket to wait for events on. It returns | * allows the caller to specify a socket to wait for events on. It returns | ||||
* 0 if any events matched and an error otherwise. There is no way to | * 0 if any events matched and an error otherwise. There is no way to | ||||
* determine which events fired. | * determine which events fired. | ||||
*/ | */ | ||||
int | int | ||||
selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td) | selsocket(struct socket *so, int events, struct timeval *tvp, struct thread *td) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |