xref: /dragonfly/sys/sys/sysmsg.h (revision fcce2b94)
1 /*
2  * SYS/SYSMSG.H
3  *
4  * $DragonFly: src/sys/sys/sysmsg.h,v 1.10 2006/06/07 03:02:11 dillon Exp $
5  */
6 
7 #ifndef _SYS_SYSMSG_H_
8 #define _SYS_SYSMSG_H_
9 
10 #ifdef _KERNEL
11 
12 #ifndef _SYS_TYPES_H_
13 #include <sys/types.h>
14 #endif
15 
16 /*
17  * The sysmsg holds the kernelland version of a system call's arguments
18  * and return value.  It typically preceeds the syscall arguments in sysunion
19  * (see sys/sysunion.h).
20  */
21 union sysunion;
22 
23 struct sysmsg {
24 	union {
25 	    void    *resultp;            /* misc pointer data or result */
26 	    int     result;              /* standard 'int'eger result */
27 	    long    lresult;             /* long result */
28 	    int     fds[2];              /* two int bit results */
29 	    __int32_t result32;          /* 32 bit result */
30 	    __int64_t result64;          /* 64 bit result */
31 	    __off_t offset;              /* off_t result */
32 	} sm_result;
33 };
34 
35 struct lwp;
36 union sysunion;
37 
38 #endif
39 
40 #ifdef _KERNEL
41 #define sysmsg_result	sysmsg.sm_result.result
42 #define sysmsg_lresult	sysmsg.sm_result.lresult
43 #define sysmsg_resultp	sysmsg.sm_result.resultp
44 #define sysmsg_fds	sysmsg.sm_result.fds
45 #define sysmsg_offset	sysmsg.sm_result.offset
46 #define sysmsg_result32	sysmsg.sm_result.result32
47 #define sysmsg_result64	sysmsg.sm_result.result64
48 #endif
49 
50 #endif
51 
52