Skip to content

Commit

Permalink
native/syscalls: rename real_clock_gettime to clock_gettime
Browse files Browse the repository at this point in the history
  • Loading branch information
Teufelchen1 committed Apr 17, 2023
1 parent 1961274 commit 10cada1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions cpu/native/include/native_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ extern mode_t (*real_umask)(mode_t cmask);
extern ssize_t (*real_writev)(int fildes, const struct iovec *iov, int iovcnt);
extern ssize_t (*real_send)(int sockfd, const void *buf, size_t len, int flags);

extern int (*real_clock_gettime)(clockid_t clk_id, struct timespec *tp);

/**
* data structures
*/
Expand Down
2 changes: 1 addition & 1 deletion cpu/native/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ unsigned int timer_read(tim_t dev)

_native_syscall_enter();

if (real_clock_gettime(CLOCK_MONOTONIC, &t) == -1) {
if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) {
err(EXIT_FAILURE, "timer_read: clock_gettime");
}

Expand Down
9 changes: 0 additions & 9 deletions cpu/native/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ mode_t (*real_umask)(mode_t cmask);
ssize_t (*real_writev)(int fildes, const struct iovec *iov, int iovcnt);
ssize_t (*real_send)(int sockfd, const void *buf, size_t len, int flags);

#ifdef __MACH__
#else
int (*real_clock_gettime)(clockid_t clk_id, struct timespec *tp);
#endif

void _native_syscall_enter(void)
{
_native_in_syscall++;
Expand Down Expand Up @@ -553,8 +548,4 @@ void _native_init_syscalls(void)
*(void **)(&real_ftell) = dlsym(RTLD_NEXT, "ftell");
*(void **)(&real_fputc) = dlsym(RTLD_NEXT, "fputc");
*(void **)(&real_fgetc) = dlsym(RTLD_NEXT, "fgetc");
#ifdef __MACH__
#else
*(void **)(&real_clock_gettime) = dlsym(RTLD_NEXT, "clock_gettime");
#endif
}

0 comments on commit 10cada1

Please sign in to comment.