2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
12 #ifndef OPENAFS_RX_EVENT_H
13 #define OPENAFS_RX_EVENT_H
15 /* This routine must be called to initialize the event package.
16 * nEvents is the number of events to allocate in a batch whenever
17 * more are needed. If this is 0, a default number (10) will be
19 extern void rxevent_Init( int nEvents, void (*scheduler)(void) );
21 /* Arrange for the indicated event at the appointed time. when is a
22 * "struct clock", in the clock.c time base */
25 extern struct rxevent *rxevent_Post(struct clock *when, struct clock *now,
26 void (*func) (struct rxevent *, void *,
28 void *arg, void *arg1, int arg2);
30 /* Remove the indicated event from the event queue. The event must be
31 * pending. Note that a currently executing event may not cancel itself.
34 extern void rxevent_Cancel(struct rxevent **, struct rx_call *, int type);
36 /* The actions specified for each event that has reached the current clock
37 * time will be taken. The current time returned by GetTime is used
38 * (warning: this may be an old time if the user has not called
41 extern int rxevent_RaiseEvents(struct clock *wait);
43 /* Acquire a reference to an event */
44 extern struct rxevent *rxevent_Get(struct rxevent *event);
46 /* Release a reference to an event */
47 extern void rxevent_Put(struct rxevent *event);
49 /* Shutdown the event package */
50 extern void shutdown_rxevent(void);