-typedef struct afs_event {
- struct afs_event *next; /* next in hash chain */
- char *event; /* lwp event: an address */
- int refcount; /* Is it in use? */
- int seq; /* Sequence number: this is incremented
- * by wakeup calls; wait will not return until
- * it changes */
-#ifdef AFS_DARWIN80_ENV
- lck_mtx_t *lck;
- thread_t owner;
-#endif
-} afs_event_t;
-
#ifdef AFS_DARWIN80_ENV
#define EVTLOCK_INIT(e) \
do { \
#define EVTLOCK_UNLOCK(e)
#define EVTLOCK_DESTROY(e)
#endif
-#define HASHSIZE 128
-afs_event_t *afs_evhasht[HASHSIZE]; /* Hash table for events */
-#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (HASHSIZE-1));
+afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */
+#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1));
int afs_evhashcnt = 0;
/* Get and initialize event structure corresponding to lwp event (i.e. address)
shutdown_osisleep(void) {
struct afs_event *evp, *nevp, **pevpp;
int i;
- for (i=0; i < HASHSIZE; i++) {
+ for (i=0; i < AFS_EVHASHSIZE; i++) {
evp = afs_evhasht[i];
pevpp = &afs_evhasht[i];
while (evp) {
osi_FreeSmallSpace(evp);
afs_evhashcnt--;
} else {
+ afs_warn("nonzero refcount in shutdown_osisleep()\n");
EVTLOCK_UNLOCK(evp);
pevpp = &evp->next;
}