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:
parent
8f726181ed
commit
e5812beaf9
@ -255,13 +255,11 @@
|
||||
#define SYS_clock_getres (__SYS_clock + 1)
|
||||
#define SYS_clock_gettime (__SYS_clock + 2)
|
||||
#define SYS_clock_settime (__SYS_clock + 3)
|
||||
#define SYS_getitimer (__SYS_clock + 4)
|
||||
#define SYS_setitimer (__SYS_clock + 5)
|
||||
#ifdef CONFIG_CLOCK_TIMEKEEPING
|
||||
# define SYS_adjtime (__SYS_clock + 6)
|
||||
# define __SYS_timers (__SYS_clock + 7)
|
||||
# define SYS_adjtime (__SYS_clock + 4)
|
||||
# define __SYS_timers (__SYS_clock + 5)
|
||||
#else
|
||||
# define __SYS_timers (__SYS_clock + 6)
|
||||
# define __SYS_timers (__SYS_clock + 4)
|
||||
#endif
|
||||
|
||||
/* The following are defined only if POSIX timers are supported */
|
||||
@ -272,7 +270,9 @@
|
||||
# define SYS_timer_getoverrun (__SYS_timers + 2)
|
||||
# define SYS_timer_gettime (__SYS_timers + 3)
|
||||
# define SYS_timer_settime (__SYS_timers + 4)
|
||||
# define __SYS_syslog (__SYS_timers + 5)
|
||||
# define SYS_getitimer (__SYS_timers + 5)
|
||||
# define SYS_setitimer (__SYS_timers + 6)
|
||||
# define __SYS_syslog (__SYS_timers + 7)
|
||||
#else
|
||||
# define __SYS_syslog __SYS_timers
|
||||
#endif
|
||||
|
@ -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*"
|
||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -178,8 +178,6 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
|
||||
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
|
||||
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
|
||||
SYSCALL_LOOKUP(getitimer, 2, STUB_getitimer)
|
||||
SYSCALL_LOOKUP(setitimer, 3, STUB_setitimer)
|
||||
#ifdef CONFIG_CLOCK_TIMEKEEPING
|
||||
SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime)
|
||||
#endif
|
||||
@ -192,6 +190,8 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
SYSCALL_LOOKUP(timer_getoverrun, 1, STUB_timer_getoverrun)
|
||||
SYSCALL_LOOKUP(timer_gettime, 2, STUB_timer_gettime)
|
||||
SYSCALL_LOOKUP(timer_settime, 4, STUB_timer_settime)
|
||||
SYSCALL_LOOKUP(getitimer, 2, STUB_getitimer)
|
||||
SYSCALL_LOOKUP(setitimer, 3, STUB_setitimer)
|
||||
#endif
|
||||
|
||||
/* System logging */
|
||||
|
@ -173,9 +173,6 @@ uintptr_t STUB_clock(int nbr);
|
||||
uintptr_t STUB_clock_getres(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_clock_gettime(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_clock_settime(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_getitimer(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_setitimer(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||
uintptr_t parm3);
|
||||
uintptr_t STUB_adjtime(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
|
||||
/* The following are defined only if POSIX timers are supported */
|
||||
@ -187,6 +184,9 @@ uintptr_t STUB_timer_getoverrun(int nbr, uintptr_t parm1);
|
||||
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);
|
||||
uintptr_t STUB_getitimer(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_setitimer(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||
uintptr_t parm3);
|
||||
|
||||
/* System logging */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user