From 4ec9caf00c407884fc51ff18adb8ff16a5eb75c0 Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 16 Dec 2007 06:21:20 +0000 Subject: Refactor select to reduce contention and hide internal implementation details from consumers. - Track individual selecters on a per-descriptor basis such that there are no longer collisions and after sleeping for events only those descriptors which triggered events must be rescaned. - Protect the selinfo (per descriptor) structure with a mtx pool mutex. mtx pool mutexes were chosen to preserve api compatibility with existing code which does nothing but bzero() to setup selinfo structures. - Use a per-thread wait channel rather than a global wait channel. - Hide select implementation details in a seltd structure which is opaque to the rest of the kernel. - Provide a 'selsocket' interface for those kernel consumers who wish to select on a socket when they have no fd so they no longer have to be aware of select implementation details. Tested by: kris Reviewed on: arch --- sys/netncp/ncp_sock.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'sys/netncp/ncp_sock.h') diff --git a/sys/netncp/ncp_sock.h b/sys/netncp/ncp_sock.h index 7833760..a3998a4 100644 --- a/sys/netncp/ncp_sock.h +++ b/sys/netncp/ncp_sock.h @@ -45,9 +45,6 @@ int ncp_sock_connect(struct ncp_conn *ncp); int ncp_sock_recv(struct socket *so, struct mbuf **mp, int *rlen); int ncp_sock_send(struct socket *so, struct mbuf *data, struct ncp_rq *rqp); int ncp_sock_disconnect(struct ncp_conn *conn); -int ncp_poll(struct socket *so, int events); -int ncp_sock_rselect(struct socket *so, struct thread *td, struct timeval *tv, - int events); int ncp_sock_checksum(struct ncp_conn *conn, int enable); void ncp_check_rq(struct ncp_conn *conn); -- cgit v1.1