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 error-foo error-foo error-foo
13 #ifndef RX_USER_INCLUDE
14 #define RX_USER_INCLUDE
16 /* rx_user.h: definitions specific to the user-level implementation of Rx */
18 #include <afs/param.h>
20 #include <stdlib.h> /* for malloc() */
23 /* These routines are no-ops in the user level implementation */
31 #define AFS_ASSERT_GLOCK()
34 #define AFS_RXGUNLOCK()
35 #define ISAFS_RXGLOCK()
36 #define AFS_ASSERT_RXGLOCK()
38 /* Some "operating-system independent" stuff, for the user mode implementation */
40 typedef void *osi_socket;
41 #define OSI_NULLSOCKET ((osi_socket) 0)
42 #else /* UAFS_CLIENT */
43 typedef afs_int32 osi_socket;
44 #define OSI_NULLSOCKET ((osi_socket) -1)
45 #endif /* UAFS_CLIENT */
47 #define osi_rxSleep(x) rxi_Sleep(x)
48 #define osi_rxWakeup(x) rxi_Wakeup(x)
53 #define osi_Alloc(size) malloc(size)
57 #define osi_Free(ptr, size) free(ptr)
62 #define osi_GetTime(timevalptr) gettimeofday(timevalptr, 0)
64 /* Just in case it's possible to distinguish between relatively long-lived stuff and stuff which will be freed very soon, but which needs quick allocation (e.g. dynamically allocated xdr things) */
65 #define osi_QuickFree(ptr, size) osi_Free(ptr, size)
66 #define osi_QuickAlloc(size) osi_Alloc(size)
68 #define osi_Assert(e) (void)((e) || (osi_AssertFailU(#e, __FILE__, __LINE__), 0))
70 #if !defined(_ANSI_C_SOURCE) || defined(AFS_SUN_ENV)
71 #if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
74 #endif /* ANSI_C_SOURCE */
76 #define osi_Msg fprintf)(stderr,
78 #endif /* RX_USER_INCLUDE */