Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / client_osi / osidb.h
1 /* 
2  * Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
3  *
4  * (C) COPYRIGHT IBM CORPORATION 1987, 1988
5  * LICENSED MATERIALS - PROPERTY OF IBM
6  *
7  */
8
9 /* Copyright (C) 1994 Cazamar Systems, Inc. */
10
11 #ifndef __OSIDB_H_ENV_
12 #define __OSIDB_H_ENV_ 1
13
14 /* mapped over remote debugging integer array for rwlock and mutexes
15  * mutexes only have writers
16  */
17 typedef struct osi_remLockInfo {
18         /* the type: rwlock or mutex */
19         long type;
20
21         /* the addr */
22         long lockAddr;
23
24         /* raw state */
25         long readers;
26         long writers;   /* should be 0 or 1 */
27         long waiters;   /* non-zero means someone waiting */
28         long owner;     /* one tid, not complete if >1 readers, 0 if unknown */
29
30         /* raw statistics, times in ms.  For mutexes, we only
31          * fill in the write times.
32          */
33         long writeLockedCount;
34         long writeLockedTime;
35         long writeBlockedCount;
36         long writeBlockedTime;
37         long readLockedCount;
38         long readLockedTime;
39         long readBlockedCount;
40         long readBlockedTime;
41 } osi_remLockInfo_t;
42
43 /* mapped over remote debugging integer array */
44 typedef struct osi_remSleepInfo {
45         long tid;               /* thread id of the blocked thread */
46         long sleepValue;        /* the value we're sleeping at */
47 } osi_remSleepInfo_t;
48
49 #define OSI_MAXRPCCALLS 2       /* one for osidb, one for AFS RPC */
50
51 extern long osi_InitDebug(osi_uid_t *);
52
53 /* only available within the OSI package */
54 extern long osi_maxCalls;
55
56 /* use this from outside of the OSI package */
57 extern long *osi_maxCallsp;
58
59 #endif /* __OSIDB_H_ENV_ */
60