Committer: Michael Beasley <mike@snafu.setup>
[mikesnafu-overlay.git] / arch / sparc64 / solaris / conv.h
blob50e58232cf2b014c128ee9148761c121f947e11b
1 /* $Id: conv.h,v 1.4 1998/08/15 20:42:51 davem Exp $
2 * conv.h: Utility macros for Solaris emulation
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 */
7 /* #define DEBUG_SOLARIS */
8 #define DEBUG_SOLARIS_KMALLOC
10 #ifndef __ASSEMBLY__
12 #include <asm/unistd.h>
14 /* Use this to get at 32-bit user passed pointers. */
15 #define A(__x) \
16 ({ unsigned long __ret; \
17 __asm__ ("srl %0, 0, %0" \
18 : "=r" (__ret) \
19 : "0" (__x)); \
20 (void __user *)__ret; \
23 extern unsigned sys_call_table[];
24 extern unsigned sys_call_table32[];
25 extern unsigned sunos_sys_table[];
27 #define SYS(name) ((long)sys_call_table[__NR_##name])
28 #define SUNOS(x) ((long)sunos_sys_table[x])
30 #ifdef DEBUG_SOLARIS
31 #define SOLD(s) printk("%s,%d,%s(): %s\n",__FILE__,__LINE__,__func__,(s))
32 #define SOLDD(s) printk("solaris: "); printk s
33 #else
34 #define SOLD(s)
35 #define SOLDD(s)
36 #endif
38 #endif /* __ASSEMBLY__ */