sysent.h (83366) | sysent.h (88633) |
---|---|
1/*- 2 * Copyright (c) 1982, 1988, 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1982, 1988, 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/sys/sysent.h 83366 2001-09-12 08:38:13Z julian $ | 33 * $FreeBSD: head/sys/sys/sysent.h 88633 2001-12-29 07:13:47Z alfred $ |
34 */ 35 36#ifndef _SYS_SYSENT_H_ 37#define _SYS_SYSENT_H_ 38 39struct thread; 40 41typedef int sy_call_t __P((struct thread *, void *)); --- 65 unchanged lines hidden (view full) --- 107 \ 108static moduledata_t name##_mod = { \ 109 #name, \ 110 syscall_module_handler, \ 111 &name##_syscall_mod \ 112}; \ 113DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) 114 | 34 */ 35 36#ifndef _SYS_SYSENT_H_ 37#define _SYS_SYSENT_H_ 38 39struct thread; 40 41typedef int sy_call_t __P((struct thread *, void *)); --- 65 unchanged lines hidden (view full) --- 107 \ 108static moduledata_t name##_mod = { \ 109 #name, \ 110 syscall_module_handler, \ 111 &name##_syscall_mod \ 112}; \ 113DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) 114 |
115#define SYSCALL_MODULE_HELPER(syscallname, argcount) \ | 115#define SYSCALL_MODULE_HELPER(syscallname) \ |
116static int syscallname##_syscall = SYS_##syscallname; \ 117static struct sysent syscallname##_sysent = { \ | 116static int syscallname##_syscall = SYS_##syscallname; \ 117static struct sysent syscallname##_sysent = { \ |
118 argcount, (sy_call_t *)& syscallname \ | 118 (sizeof(struct syscallname ## _args ) \ 119 / sizeof(register_t)), \ 120 (sy_call_t *)& syscallname \ |
119}; \ 120SYSCALL_MODULE(syscallname, \ 121 & syscallname##_syscall, & syscallname##_sysent, \ 122 NULL, NULL); 123 124int syscall_register __P((int *offset, struct sysent *new_sysent, 125 struct sysent *old_sysent)); 126int syscall_deregister __P((int *offset, struct sysent *old_sysent)); 127int syscall_module_handler __P((struct module *mod, int what, void *arg)); 128 129#endif /* _KERNEL */ 130 131#endif /* !_SYS_SYSENT_H_ */ | 121}; \ 122SYSCALL_MODULE(syscallname, \ 123 & syscallname##_syscall, & syscallname##_sysent, \ 124 NULL, NULL); 125 126int syscall_register __P((int *offset, struct sysent *new_sysent, 127 struct sysent *old_sysent)); 128int syscall_deregister __P((int *offset, struct sysent *old_sysent)); 129int syscall_module_handler __P((struct module *mod, int what, void *arg)); 130 131#endif /* _KERNEL */ 132 133#endif /* !_SYS_SYSENT_H_ */ |