rx: Use opr queues
[openafs.git] / src / rx / rx_server.h
1 /* Application server thread management structures and functions */
2
3 /* A server puts itself on an idle queue for a service using an
4  * instance of the following structure.  When a call arrives, the call
5  * structure pointer is placed in "newcall", the routine to execute to
6  * service the request is placed in executeRequestProc, and the
7  * process is woken up.  The queue entry's address is used for the
8  * sleep/wakeup. If socketp is non-null, then this thread is willing
9  * to become a listener thread. A thread sets *socketp to -1 before
10  * sleeping. If *socketp is not -1 when the thread awakes, it is now
11  * the listener thread for *socketp. When socketp is non-null, tno
12  * contains the server's threadID, which is used to make decisions
13  * in GetCall.
14  */
15
16 #ifdef KDUMP_RX_LOCK
17 struct rx_serverQueueEntry_rx_lock {
18 #else
19 struct rx_serverQueueEntry {
20 #endif
21     struct opr_queue entry;
22 #ifdef KDUMP_RX_LOCK
23     struct rx_call_rx_lock *newcall;
24 #else
25     struct rx_call *newcall;
26 #endif
27 #ifdef  RX_ENABLE_LOCKS
28     afs_kmutex_t lock;
29     afs_kcondvar_t cv;
30 #endif
31     int tno;
32     osi_socket *socketp;
33 };