From f5e5908a703975c35d157f10d86ba58fee178d37 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 19 Jun 2016 07:03:44 -0600 Subject: [PATCH] vsyslog is now a system call --- include/sys/syscall.h | 9 +++++++-- syscall/syscall.csv | 1 + syscall/syscall_funclookup.c | 1 + syscall/syscall_lookup.h | 4 ++++ syscall/syscall_stublookup.c | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 198b27c953..9fc12fa39c 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -225,11 +225,16 @@ # define SYS_timer_getoverrun (__SYS_timers+2) # define SYS_timer_gettime (__SYS_timers+3) # define SYS_timer_settime (__SYS_timers+4) -# define __SYS_descriptors (__SYS_timers+5) +# define __SYS_syslog (__SYS_timers+5) #else -# define __SYS_descriptors __SYS_timers +# define __SYS_syslog __SYS_timers #endif +/* Unconditional system logging */ + +#define SYS_vsyslog (__SYS_syslog+0) +#define __SYS_descriptors (__SYS_syslog+1) + /* The following are defined if either file or socket descriptor are * enabled. */ diff --git a/syscall/syscall.csv b/syscall/syscall.csv index a7d8121535..4579f3dedb 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -159,6 +159,7 @@ "up_assert","assert.h","","void","FAR const uint8_t*","int" #"up_assert","assert.h","","void" "vfork","unistd.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t" +"vsyslog","syslog.h","","int","int","FAR const IPTR char*","va_list" "wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","int*" "waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int" "waitpid","sys/wait.h","defined(CONFIG_SCHED_WAITPID)","pid_t","pid_t","int*","int" diff --git a/syscall/syscall_funclookup.c b/syscall/syscall_funclookup.c index 8e62470103..7d4cbc5ef6 100644 --- a/syscall/syscall_funclookup.c +++ b/syscall/syscall_funclookup.c @@ -72,6 +72,7 @@ #include #include #include +#include #include /* Errno access is awkward. We need to generate get_errno() and set_errno() diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 8fb2f507b0..cc72809fd0 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -163,6 +163,10 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(timer_settime, 4, STUB_timer_settime) #endif +/* System logging */ + + SYSCALL_LOOKUP(vsyslog, 3, STUB_vsyslog) + /* The following are defined if either file or socket descriptor are * enabled. */ diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index 63af75eb40..0c0c589fef 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -165,6 +165,11 @@ uintptr_t STUB_timer_gettime(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_timer_settime(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4); +/* System logging */ + +uintptr_t STUB_vsyslog(int nbr, uintptr_t parm1, uintptr_t parm2, + uintptr_t parm3); + /* The following are defined if either file or socket descriptor are * enabled. */