6 ****************************************************************************
7 * Copyright IBM Corporation 1988, 1989 - All Rights Reserved *
8 * Copyright Transarc Corporation 1993 - All Rights Reserved *
10 * Permission to use, copy, modify, and distribute this software and its *
11 * documentation for any purpose and without fee is hereby granted, *
12 * provided that the above copyright notice appear in all copies and *
13 * that both that copyright notice and this permission notice appear in *
14 * supporting documentation, and that neither the name of IBM nor the name *
15 * of Transarc be used in advertising or publicity pertaining to *
16 * distribution of the software without specific, written prior permission. *
18 * IBM AND TRANSARC DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *
19 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO *
20 * EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL *
21 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR *
22 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS *
23 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF *
25 ****************************************************************************
29 #if defined(AFS_SUN5_ENV) && defined(KERNEL)
30 #if defined(AFS_FINEGR_SUNLOCK)
31 #define RX_ENABLE_LOCKS 1
33 #undef RX_ENABLE_LOCKS
35 #include <sys/tiuser.h>
36 #include <sys/t_lock.h>
37 #include <sys/mutex.h>
50 #if defined(AFS_AIX32_ENV) && defined(KERNEL)
51 #define PIN(a, b) pin(a, b);
52 #define UNPIN(a, b) unpin(a, b);
58 #if defined(AFS_GLOBAL_SUNLOCK) && defined(KERNEL)
59 extern kmutex_t afs_rxglobal_lock
;
61 #define GLOBAL_LOCK() mutex_enter(&afs_rxglobal_lock)
62 #define GLOBAL_UNLOCK() mutex_exit(&afs_rxglobal_lock)
65 #define GLOBAL_UNLOCK()
68 #ifdef RX_ENABLE_LOCKS
69 extern kmutex_t afs_termStateLock
;
70 extern kcondvar_t afs_termStateCv
;
72 #define RX_MUTEX_DESTROY(a) mutex_destroy(a)
73 #define RX_MUTEX_ENTER(a) mutex_enter(a)
74 #define RX_MUTEX_EXIT(a) mutex_exit(a)
75 #define RX_MUTEX_INIT(a,b,c,d) mutex_init(a,b,c,d)
77 #define MObtainWriteLock(a)
78 #define MReleaseWriteLock(a)
79 #define RX_MUTEX_DESTROY(a)
80 #define RX_MUTEX_ENTER(a)
81 #define RX_MUTEX_EXIT(a)
82 #define RX_MUTEX_INIT(a,b,c,d)
86 #define IFADDR2SA(f) (&((f)->ifa_addr))
87 #else /* AFS_AIX32_ENV */
88 #define IFADDR2SA(f) ((f)->ifa_addr)
92 #endif /* _RX_MACHDEP_ */