syscall/ and include/sys/syscall.h: Fix an inconsistency. In someplaces, getitimer() and setitimer() depend on CONFIG_DISABLE_POSIX_TIMERS=n and in other places they depend on nothing. As a result, there are link failures when CONFIG_DISABLE_POSIX_TIMERS=y. Which is correct? On one hand, these interfaces are not POSIX timers, so conditioning them on on CONFIG_DISABLE_POSIX_TIMERS. I opted to keep the dependence and just apply it consistently. I did this because setitimer() and getitimer() are seldom used so it is really best if a system call is no generated for them in all cases.

This commit is contained in:
Gregory Nutt
2019-11-14 15:10:04 -06:00
parent 8f726181ed
commit e5812beaf9
4 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -33,7 +33,7 @@
"get_errno_ptr","errno.h","defined(__DIRECT_ERRNO_ACCESS)","FAR int*"
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char*","FAR const char*"
"getgid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","gid_t"
"getitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR struct itimerval*"
"getitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR struct itimerval *"
"getpeername","sys/socket.h","defined(CONFIG_NET)","int","int","FAR struct sockaddr *","FAR socklen_t *"
"getpid","unistd.h","","pid_t"
"getrandom","sys/random.h","defined(CONFIG_CRYPTO_RANDOM_POOL)","void","FAR void*","size_t"
@@ -175,7 +175,7 @@
"timer_create","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","clockid_t","FAR struct sigevent*","FAR timer_t*"
"timer_delete","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t"
"timer_getoverrun","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t"
"timer_gettime","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t","FAR struct itimerspec*"
"timer_gettime","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t","FAR struct itimerspec *"
"timer_settime","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t","int","FAR const struct itimerspec*","FAR struct itimerspec*"
"umount2","sys/mount.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","unsigned int"
"uname","sys/utsname.h","","int","FAR struct utsname*"
1 _exit unistd.h void int
33 get_errno_ptr errno.h defined(__DIRECT_ERRNO_ACCESS) FAR int*
34 getenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) FAR char* FAR const char*
35 getgid unistd.h defined(CONFIG_SCHED_USER_IDENTITY) gid_t
36 getitimer sys/time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int int
37 getpeername sys/socket.h defined(CONFIG_NET) int int
38 getpid unistd.h pid_t
39 getrandom sys/random.h defined(CONFIG_CRYPTO_RANDOM_POOL) void FAR void*
175 timer_create time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int clockid_t
176 timer_delete time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int timer_t
177 timer_getoverrun time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int timer_t
178 timer_gettime time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int timer_t
179 timer_settime time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int timer_t
180 umount2 sys/mount.h !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char*
181 uname sys/utsname.h int FAR struct utsname*