1 /* reentrant system call template */
3 /* Lots of system calls are trivial functions, so we build their source files
4 from a template. New syscalls can be added simply by editing the
7 The system calls aren't necessarily reentrant. If we were being used in
8 an embedded system they could be. Reentrant syscalls are also used,
9 however, to provide ANSI C namespace clean access to the host o/s.
11 Usage: Compile this file with "func" set to the name of the syscall. */
13 #include "sys/syscallasm.h"
15 #define concat(a,b) a##b
16 #define concat3(a,b,c) a##b##c
17 #define makesys(a) concat (SYS_, a)
18 #define make_r_fn(a) concat3 (_, a, _r)
20 /* The leading _'s get turned into #'s by the Makefile. */
23 defsyscall_r (make_r_fn (func), makesys (func))
25 defsyscall (func, makesys (func))