2 * Copyright 2000, International Business Machines Corporation and others.
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
11 * AIX OSI header file. Extends afs_osi.h.
13 * afs_osi.h includes this file, which is the only way this file should
14 * be included in a source file. This file can redefine macros declared in
18 #ifndef _OSI_MACHDEP_H_
19 #define _OSI_MACHDEP_H_
22 #undef osi_ThreadUnique
23 #define osi_ThreadUnique() thread_self()
27 #define osi_Time() (time)
29 #define AFS_UCRED ucred
30 #define AFS_PROC struct proc
32 #define afs_bufferpages v.v_bufhw
34 #define osi_vnhold(avc, r) do { (avc)->vrefCount++; } while (0)
36 #define AFS_FAST_HOLD(vp) (vp)->vrefCount++
38 #define AFS_FAST_RELE(vp) (vp)->vrefCount--
41 #define gop_lookupname(fnamep,segflg,followlink,compvpp) \
42 lookupvp((fnamep), (followlink), (compvpp), &afs_osi_cred)
48 /* #undef getpid getpid() provided by native kernel */
50 #define get_ulimit() (ulimit(GET_FSIZE, 0) << UBSHIFT)
53 #include <sys/lockl.h>
54 #include <sys/lock_def.h>
55 #include <sys/lock_alloc.h>
56 #include <sys/sleep.h>
58 extern simple_lock_data afs_global_lock;
59 #define AFS_GLOCK() do { \
60 if (lock_mine((void *)&afs_global_lock)) \
61 osi_Panic("AFS_GLOCK %s %d", \
62 __FILE__, __LINE__); \
63 simple_lock((void *)&afs_global_lock); \
65 #define AFS_GUNLOCK() do { \
66 if (!lock_mine((void *)&afs_global_lock)) \
67 osi_Panic("AFS_GUNLOCK %s %d", \
68 __FILE__, __LINE__); \
69 simple_unlock((void *)&afs_global_lock); \
71 #define ISAFS_GLOCK() lock_mine((void *)&afs_global_lock)
73 #define ifnet_flags(x) (x?(x)->if_flags:0)
76 #endif /* _OSI_MACHDEP_H_ */