rx_user.lo: rx.h rx_user.h rx_prototypes.h
rx_packet.lo: rx_packet.c rx_packet.h rx.h
rx_rdwr.lo: rx_rdwr.c rx.h rx_prototypes.h
-rx.lo: rx.h rx_user.h rx_prototypes.h
+rx.lo: rx.h rx_user.h rx_server.h rx_prototypes.h
rx_conncache.lo: rx.h rx_prototypes.h
rx_trace.lo: rx_trace.h
rx_getaddr.lo: rx.h rx_getaddr.c rx_prototypes.h
#include "rx_conn.h"
#include "rx_call.h"
#include "rx_packet.h"
+#include "rx_server.h"
#include <afs/rxgen_consts.h>
rx_atomic_t rx_nWaiting = RX_ATOMIC_INIT(0);
rx_atomic_t rx_nWaited = RX_ATOMIC_INIT(0);
+/* Incoming calls wait on this queue when there are no available
+ * server processes */
+struct rx_queue rx_incomingCallQueue;
+
+/* Server processes wait on this queue when there are no appropriate
+ * calls to process */
+struct rx_queue rx_idleServerQueue;
+
#if !defined(offsetof)
#include <stddef.h> /* for definition of offsetof() */
#endif
#endif /* KDUMP_RX_LOCK */
-/* A server puts itself on an idle queue for a service using an
- * instance of the following structure. When a call arrives, the call
- * structure pointer is placed in "newcall", the routine to execute to
- * service the request is placed in executeRequestProc, and the
- * process is woken up. The queue entry's address is used for the
- * sleep/wakeup. If socketp is non-null, then this thread is willing
- * to become a listener thread. A thread sets *socketp to -1 before
- * sleeping. If *socketp is not -1 when the thread awakes, it is now
- * the listener thread for *socketp. When socketp is non-null, tno
- * contains the server's threadID, which is used to make decitions in GetCall.
- */
-#ifdef KDUMP_RX_LOCK
-struct rx_serverQueueEntry_rx_lock {
-#else
-struct rx_serverQueueEntry {
-#endif
- struct rx_queue queueItemHeader;
-#ifdef KDUMP_RX_LOCK
- struct rx_call_rx_lock *newcall;
-#else
- struct rx_call *newcall;
-#endif
-#ifdef RX_ENABLE_LOCKS
- afs_kmutex_t lock;
- afs_kcondvar_t cv;
-#endif
- int tno;
- osi_socket *socketp;
-};
-
#ifndef KDUMP_RX_LOCK
/* Flag bits for connection structure */
#define RX_CONN_MAKECALL_WAITING 1 /* rx_NewCall is waiting for a channel */
EXT afs_kmutex_t rx_serverPool_lock;
#endif /* RX_ENABLE_LOCKS */
-/* Incoming calls wait on this queue when there are no available server processes */
-EXT struct rx_queue rx_incomingCallQueue;
-
-/* Server processes wait on this queue when there are no appropriate calls to process */
-EXT struct rx_queue rx_idleServerQueue;
-
/* Constant delay time before sending a hard ack if the receiver consumes
* a packet while no delayed ack event is scheduled. Ensures that the
* sender is able to advance its window when the receiver consumes a packet
struct rx_queue * q);
#endif
+extern struct rx_queue rx_idleServerQueue;
+
/* some rules about packets:
* 1. When a packet is allocated, the final iov_buf contains room for
* a security trailer, but iov_len masks that fact. If the security
--- /dev/null
+/* Application server thread management structures and functions */
+
+/* A server puts itself on an idle queue for a service using an
+ * instance of the following structure. When a call arrives, the call
+ * structure pointer is placed in "newcall", the routine to execute to
+ * service the request is placed in executeRequestProc, and the
+ * process is woken up. The queue entry's address is used for the
+ * sleep/wakeup. If socketp is non-null, then this thread is willing
+ * to become a listener thread. A thread sets *socketp to -1 before
+ * sleeping. If *socketp is not -1 when the thread awakes, it is now
+ * the listener thread for *socketp. When socketp is non-null, tno
+ * contains the server's threadID, which is used to make decisions
+ * in GetCall.
+ */
+
+#ifdef KDUMP_RX_LOCK
+struct rx_serverQueueEntry_rx_lock {
+#else
+struct rx_serverQueueEntry {
+#endif
+ struct rx_queue queueItemHeader;
+#ifdef KDUMP_RX_LOCK
+ struct rx_call_rx_lock *newcall;
+#else
+ struct rx_call *newcall;
+#endif
+#ifdef RX_ENABLE_LOCKS
+ afs_kmutex_t lock;
+ afs_kcondvar_t cv;
+#endif
+ int tno;
+ osi_socket *socketp;
+};