LINUX: afs_create infinite fetchStatus loop
[pkg-k5-afs_openafs.git] / src / WINNT / client_osi / osi.h
blobaad1fc02e7e2734afe005e618d275742d9630161
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
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 */
10 /* Copyright (C) 1994 Cazamar Systems, Inc. */
12 #ifndef OPENAFS_WINNT_CLIENT_OSI_OSI_H
13 #define OPENAFS_WINNT_CLIENT_OSI_OSI_H 1
15 #include <afs/param.h>
17 /* misc definitions */
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"
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))
37 #define LargeIntegerGreaterThanOrEqualTo(a, b) \
38 ((a).HighPart > (b).HighPart || \
39 ((a).HighPart == (b).HighPart && (a).LowPart >= (b).LowPart))
41 #define LargeIntegerLessThan(a, b) \
42 ((a).HighPart < (b).HighPart || \
43 ((a).HighPart == (b).HighPart && (a).LowPart < (b).LowPart))
45 #define LargeIntegerLessThanOrEqualTo(a, b) \
46 ((a).HighPart < (b).HighPart || \
47 ((a).HighPart == (b).HighPart && (a).LowPart <= (b).LowPart))
49 #define LargeIntegerEqualTo(a, b) \
50 ((a).HighPart == (b).HighPart && (a).LowPart == (b).LowPart)
52 #define LargeIntegerGreaterThanZero(a) \
53 ((a).HighPart > 0 || ((a).HighPart == 0 && (a).LowPart != 0))
55 #define LargeIntegerGreaterOrEqualToZero(a) ((a).HighPart >= 0)
57 #define LargeIntegerLessThanZero(a) ((a).HighPart < 0)
59 #define LargeIntegerNotEqualToZero(a) ((a).HighPart || (a).LowPart)
60 #endif
61 typedef GUID osi_uid_t;
63 typedef int int32;
65 /* basic util functions */
66 #include "osiutils.h"
68 /* FD operations */
69 #include "osifd.h"
71 /* lock type definitions */
72 #include "osiltype.h"
74 /* basic sleep operations */
75 #include "osisleep.h"
77 /* base lock definitions */
78 #include "osibasel.h"
80 /* statistics gathering lock definitions */
81 #include "osistatl.h"
83 /* RPC debug stuff */
84 #include "osidb.h"
86 /* log stuff */
87 #include "osilog.h"
89 #endif /* OPENAFS_WINNT_CLIENT_OSI_OSI_H */