death to trailing whitespace
[openafs.git] / src / WINNT / client_osi / osi.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 _OSI_H_ENV_
13 #define _OSI_H_ENV_ 1
14
15 #include <afs/param.h>
16
17 /* misc definitions */
18
19 /* large int */
20 #include <rpc.h>
21 #if !defined(_MSC_VER) || (_MSC_VER < 1300)
22 #include "largeint.h"
23 #endif
24 #include "osithrdnt.h"
25
26 typedef LARGE_INTEGER osi_hyper_t;
27 #if _MSC_VER >= 1300
28 LARGE_INTEGER LargeIntegerAdd(LARGE_INTEGER a, LARGE_INTEGER b);
29 LARGE_INTEGER LargeIntegerSubtract(LARGE_INTEGER a, LARGE_INTEGER b);
30 LARGE_INTEGER ExtendedLargeIntegerDivide(LARGE_INTEGER a, unsigned long b, unsigned long *remainder);
31 LARGE_INTEGER LargeIntegerDivide(LARGE_INTEGER a, LARGE_INTEGER b, LARGE_INTEGER *remainder);
32 LARGE_INTEGER ConvertLongToLargeInteger(unsigned long a);
33 #define LargeIntegerGreaterThan(a, b) \
34  ((a).HighPart > (b).HighPart || \
35   ((a).HighPart == (b).HighPart && (a).LowPart > (b).LowPart))
36
37 #define LargeIntegerGreaterThanOrEqualTo(a, b) \
38  ((a).HighPart > (b).HighPart || \
39   ((a).HighPart == (b).HighPart && (a).LowPart >= (b).LowPart))
40
41 #define LargeIntegerLessThan(a, b) \
42  ((a).HighPart < (b).HighPart || \
43   ((a).HighPart == (b).HighPart && (a).LowPart < (b).LowPart))
44
45 #define LargeIntegerLessThanOrEqualTo(a, b) \
46  ((a).HighPart < (b).HighPart || \
47   ((a).HighPart == (b).HighPart && (a).LowPart <= (b).LowPart))
48
49 #define LargeIntegerEqualTo(a, b) \
50   ((a).HighPart == (b).HighPart && (a).LowPart == (b).LowPart)
51
52 #define LargeIntegerGreaterThanZero(a) \
53  ((a).HighPart > 0 || ((a).HighPart == 0 && (a).LowPart != 0))
54
55 #define LargeIntegerGreaterOrEqualToZero(a) ((a).HighPart >= 0)
56
57 #define LargeIntegerLessThanZero(a) ((a).HighPart < 0)
58
59 #define LargeIntegerNotEqualToZero(a) ((a).HighPart || (a).LowPart)
60 #endif
61 typedef GUID osi_uid_t;
62
63 typedef int int32;
64
65 /* basic util functions */
66 #include "osiutils.h"
67
68 /* FD operations */
69 #include "osifd.h"
70
71 /* lock type definitions */
72 #include "osiltype.h"
73
74 /* basic sleep operations */
75 #include "osisleep.h"
76
77 /* base lock definitions */
78 #include "osibasel.h"
79
80 /* statistics gathering lock definitions */
81 #include "osistatl.h"
82
83 /* RPC debug stuff */
84 #include "osidb.h"
85
86 /* log stuff */
87 #include "osilog.h"
88
89 #endif /*_OSI_H_ENV_ */