diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 636c918e38..755162a744 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -82,29 +82,23 @@ #define SYS_sched_yield (CONFIG_SYS_RESERVED+12) #define SYS_set_errno (CONFIG_SYS_RESERVED+13) -/* SYSLOG */ - -#define SYS_syslog (CONFIG_SYS_RESERVED+14) -#define SYS_lowsyslog (CONFIG_SYS_RESERVED+15) -#define SYS_setlogmask (CONFIG_SYS_RESERVED+16) - /* Semaphores */ -#define SYS_sem_destroy (CONFIG_SYS_RESERVED+17) -#define SYS_sem_post (CONFIG_SYS_RESERVED+18) -#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+19) -#define SYS_sem_trywait (CONFIG_SYS_RESERVED+20) -#define SYS_sem_wait (CONFIG_SYS_RESERVED+21) +#define SYS_sem_destroy (CONFIG_SYS_RESERVED+14) +#define SYS_sem_post (CONFIG_SYS_RESERVED+15) +#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+16) +#define SYS_sem_trywait (CONFIG_SYS_RESERVED+17) +#define SYS_sem_wait (CONFIG_SYS_RESERVED+18) /* Named semaphores */ #ifdef CONFIG_FS_NAMED_SEMAPHORES -# define SYS_sem_open (CONFIG_SYS_RESERVED+22) -# define SYS_sem_close (CONFIG_SYS_RESERVED+23) -# define SYS_sem_unlink (CONFIG_SYS_RESERVED+24) -# define __SYS_task_create (CONFIG_SYS_RESERVED+25) -#else +# define SYS_sem_open (CONFIG_SYS_RESERVED+19) +# define SYS_sem_close (CONFIG_SYS_RESERVED+20) +# define SYS_sem_unlink (CONFIG_SYS_RESERVED+21) # define __SYS_task_create (CONFIG_SYS_RESERVED+22) +#else +# define __SYS_task_create (CONFIG_SYS_RESERVED+19) #endif /* Task creation APIs based on global entry points cannot be use with diff --git a/include/syslog.h b/include/syslog.h index 7d163e30fa..261c8dfc64 100644 --- a/include/syslog.h +++ b/include/syslog.h @@ -49,25 +49,6 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ************************************************************/ -/* Some interfaces in this file are currently only available within the - * kernel. They could are available to applications in the flat build and - * could be made available in the protected and kernel builds IF system - * calls were added. - * - * REVISIT: For example, I don't yet know how to pass a va_list in a system - * call so none of those interfaces. - * - * NOTE: In protected and kernel builds, there may also be a limit to the - * number of parameters that are supported in the variable parameter list. - */ - -#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL) -# undef __KERNEL__ -# define __KERNEL__ 1 -#endif - -/* syslog interface *********************************************************/ /* The option argument to openlog() is an OR of any of these: * * LOG_CONS - Write directly to system console if there is an error @@ -156,9 +137,7 @@ void closelog(void); */ int syslog(int priority, FAR const char *format, ...); -#ifdef __KERNEL__ int vsyslog(int priority, FAR const char *src, va_list ap); -#endif #ifdef CONFIG_ARCH_LOWPUTC /* These are non-standard, low-level system logging interface. The @@ -172,9 +151,7 @@ int vsyslog(int priority, FAR const char *src, va_list ap); */ int lowsyslog(int priority, FAR const char *format, ...); -# ifdef __KERNEL__ int lowvsyslog(int priority, FAR const char *format, va_list ap); -# endif #else /* If the platform cannot support lowsyslog, then we will substitute the @@ -188,9 +165,7 @@ int lowvsyslog(int priority, FAR const char *format, va_list ap); # else # define lowsyslog (void) # endif -# ifdef __KERNEL__ -# define lowvsyslog(p,f,a) vsyslog(p,f,a) -# endif +# define lowvsyslog(p,f,a) vsyslog(p,f,a) #endif /* The setlogmask() function sets the logmask and returns the previous diff --git a/libc/libc.csv b/libc/libc.csv index 4d05a2af65..1a6e38cac7 100644 --- a/libc/libc.csv +++ b/libc/libc.csv @@ -65,6 +65,8 @@ "llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int" "lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..." "llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..." +"lowsyslog","syslog.h","","int","int","FAR const char *","..." +"lowvsyslog","syslog.h","","int","int","FAR const char *","va_list" "match","nuttx/regex.h","","int","const char *","const char *" "memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t" "memchr","string.h","","FAR void","FAR const void *","int c","size_t" @@ -110,6 +112,7 @@ "sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *" "sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int" "sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t" +"setlogmask","syslog.h","","int","int" "sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int" "sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int" "sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *" @@ -154,6 +157,7 @@ "strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base" "strtoul","stdlib.h","","unsigned long","const char *","char **","int" "strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int" +"syslog","syslog.h","","int","int","FAR const char *","..." "tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int" "tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *" "tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *" @@ -169,3 +173,4 @@ "vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list" "vsprintf","stdio.h","","int","FAR char *","const char *","va_list" "vsscanf","stdio.h","","int","char *","const char *","va_list" +"vsyslog","syslog.h","","int","int","FAR const char *","va_list" diff --git a/syscall/syscall.csv b/syscall/syscall.csv index dd002aa99e..1831c652cd 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -29,7 +29,6 @@ "ioctl","sys/ioctl.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","unsigned long" "kill","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","pid_t","int" "listen","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int" -"lowsyslog","syslog.h","","int","int","FAR const char *","..." "lseek","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","int","off_t","int" "mkdir","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","mode_t" "mkfifo","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR const char*","mode_t" @@ -119,7 +118,6 @@ "sendto","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR const void*","size_t","int","FAR const struct sockaddr*","socklen_t" "set_errno","errno.h","","void","int" "setenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","const char*","const char*","int" -"setlogmask","syslog.h","","int","int" "setsockopt","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int","int","FAR const void*","socklen_t" "shmat", "sys/shm.h", "defined(CONFIG_MM_SHM)", "FAR void *", "int", "FAR const void *", "int" "shmctl", "sys/shm.h", "defined(CONFIG_MM_SHM)", "int", "int", "int", "FAR struct shmid_ds *" @@ -136,7 +134,6 @@ "stat","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","FAR struct stat*" #"statfs","stdio.h","","int","FAR const char*","FAR struct statfs*" "statfs","sys/statfs.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","struct statfs*" -"syslog","syslog.h","","int","int","FAR const char *","..." "task_create","sched.h","!defined(CONFIG_BUILD_KERNEL)", "int","FAR const char*","int","int","main_t","FAR char * const []|FAR char * const *" #"task_create","sched.h","","int","const char*","int","main_t","FAR char * const []|FAR char * const *" "task_delete","sched.h","","int","pid_t" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 5a5e1a95b3..1c640d0b39 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -58,12 +58,6 @@ SYSCALL_LOOKUP(sched_unlock, 0, STUB_sched_unlock) SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield) SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno) -/* SYSLOG */ - -SYSCALL_LOOKUP(syslog, 6, SYS_syslog) -SYSCALL_LOOKUP(lowsyslog, 6, SYS_lowsyslog) -SYSCALL_LOOKUP(setlogmask, 1, SYS_setlogmask) - /* Semaphores */ SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy) diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index 24471c4e86..6068021b7e 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -76,14 +76,6 @@ uintptr_t STUB_sched_setscheduler(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t STUB_sched_unlock(int nbr); uintptr_t STUB_sched_yield(int nbr); -/* SYSLOG */ - -uintptr_t STUB_syslog(int nbr, uintptr_t parm1, uintptr_t parm2, - uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6); -uintptr_t STUB_lowsyslog(int nbr, uintptr_t parm1, uintptr_t parm2, - uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6); -uintptr_t STUB_setlogmask(int nbr, uintptr_t parm1); - /* Semaphores */ uintptr_t STUB_sem_close(int nbr, uintptr_t parm1);