4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 only,
8 * as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License version 2 for more details (a copy is included
14 * in the LICENSE file that accompanied this code).
16 * You should have received a copy of the GNU General Public License
17 * version 2 along with this program; If not, see
18 * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
20 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21 * CA 95054 USA or visit www.sun.com if you need additional information or
27 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28 * Use is subject to license terms.
31 * This file is part of Lustre, http://www.lustre.org/
32 * Lustre is a trademark of Sun Microsystems, Inc.
35 #ifndef __LIBCFS_WINNT_KP30_H__
36 #define __LIBCFS_WINNT_KP30_H__
40 /* Module parameter support */
41 #define CFS_MODULE_PARM(name, t, type, perm, desc)
43 #define CFS_SYSFS_MODULE_PARM 0 /* no sysfs access to module parameters */
47 void libcfs_panic(char *msg);
48 #define panic(msg) libcfs_panic(msg)
49 void libcfs_register_panic_notifier();
50 void libcfs_unregister_panic_notifier();
53 #define cfs_work_struct_t WORK_QUEUE_ITEM
54 #define cfs_schedule_work(tq)
55 #define cfs_get_work_data(type,field,data) (data)
57 /* ------------------------------------------------------------------- */
59 #define PORTAL_SYMBOL_REGISTER(x) cfs_symbol_register(#x, &x)
60 #define PORTAL_SYMBOL_UNREGISTER(x) cfs_symbol_unregister(#x)
62 #define symbol_get(x) (cfs_symbol_get(#x))
63 #define symbol_put(x) cfs_symbol_put(#x)
65 #define try_module_get(THIS_MODULE) do{}while(0)
66 #define module_put(THIS_MODULE) do{}while(0)
68 #define printk DbgPrint
69 #define ptintf DbgPrint
70 #define printk_ratelimit() (FALSE)
71 #define vprintk(f, a) vDbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, f, a)
72 /* vDbgPrintEx only available on xp and later OS */
73 #define cfs_assert ASSERT
75 #else /* !__KERNEL__ */
80 # include <cygwin-ioctl.h>
85 #define cfs_assert _ASSERT
88 #define get_cpu() smp_processor_id()
89 #define put_cpu() do { } while (0)
93 #endif /* End of !__KERNEL__ */
95 /******************************************************************************/
97 * Support for temporary event tracing with minimal Heisenberg effect. */
100 /* kernel hasn't defined this? */
109 # if BITS_PER_LONG > 32
115 # define LWT_EVENT(p1,p2,p3,p4)
118 /* ------------------------------------------------------------------ */
120 #define IOCTL_LIBCFS_TYPE long_ptr_t
123 # ifndef BITS_PER_LONG
124 # if (~0UL) == 0xffffffffUL
125 # define BITS_PER_LONG 32
127 # define BITS_PER_LONG 64
132 #if BITS_PER_LONG > 32
133 # define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
134 # define LL_POISON ((long_ptr_t)0x5a5a5a5a5a5a5a5a)
135 # define LP_POISON ((char *)(long_ptr_t)0x5a5a5a5a5a5a5a5a)
137 # define LI_POISON ((int)0x5a5a5a5a)
138 # define LL_POISON ((long_ptr_t)0x5a5a5a5a)
139 # define LP_POISON ((char *)(long_ptr_t)0x5a5a5a5a)
142 #define LPF64 "%I64d"
143 #define LPU64 "%I64u"
144 #define LPD64 "%I64d"
145 #define LPX64 "%#I64x"
146 #define LPO64 "%#I64o"
149 * long_ptr_t & ulong_ptr_t, same to "long" for linux
157 # define LPLU "%Ii64u"
158 # define LPLD "%I64d"
159 # define LPLX "%#I64x"