1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 #ifndef __LIBCFS_DARWIN_KP30__
5 #define __LIBCFS_DARWIN_KP30__
7 #ifndef __LIBCFS_KP30_H__
8 #error Do not #include this file directly. #include <libcfs/kp30.h> instead
13 #include <sys/types.h>
14 #include <sys/malloc.h>
15 #include <sys/systm.h>
16 #include <mach/mach_types.h>
20 #include <miscfs/devfs/devfs.h>
23 #include <libcfs/darwin/darwin-lock.h>
24 #include <libcfs/darwin/darwin-prim.h>
25 #include <portals/p30.h>
27 #define our_cond_resched() schedule_timeout(1);
30 #define LASSERT_SPIN_LOCKED(lock) do {} while(0) /* XXX */
32 #define LASSERT_SPIN_LOCKED(lock) do {} while(0)
35 #define LBUG_WITH_LOC(file, func, line) portals_catastrophe = 1
37 /* --------------------------------------------------------------------- */
39 #define PORTAL_SYMBOL_REGISTER(x) cfs_symbol_register(#x, &x)
40 #define PORTAL_SYMBOL_UNREGISTER(x) cfs_symbol_unregister(#x)
42 #define PORTAL_SYMBOL_GET(x) ((typeof(&x))cfs_symbol_get(#x))
43 #define PORTAL_SYMBOL_PUT(x) cfs_symbol_put(#x)
45 #define PORTAL_MODULE_USE do{int i = 0; i++;}while(0)
46 #define PORTAL_MODULE_UNUSE do{int i = 0; i--;}while(0)
48 #define printk(format, args...) printf(format, ## args)
50 #else /* !__KERNEL__ */
56 # include <machine/limits.h>
57 # include <sys/types.h>
60 /******************************************************************************/
62 * Support for temporary event tracing with minimal Heisenberg effect. */
75 # define LWT_EVENT(p1,p2,p3,p4) /* no lwt implementation yet */
77 /* -------------------------------------------------------------------------- */
79 #define IOCTL_PORTAL_TYPE struct portal_ioctl_data
86 # define LI_POISON ((int)0x5a5a5a5a)
87 # define LL_POISON ((long)0x5a5a5a5a)
88 # define LP_POISON ((void *)(long)0x5a5a5a5a)