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