Fix-Point commented on code in PR #15044: URL: https://github.com/apache/nuttx/pull/15044#discussion_r1877657421
########## drivers/timers/arch_alarm.c: ########## @@ -46,6 +46,7 @@ static FAR struct oneshot_lowerhalf_s *g_oneshot_lower; #ifndef CONFIG_SCHED_TICKLESS static clock_t g_current_tick; +static clock_t g_base_tick; Review Comment: Can you provide the NuttX configuration? I am trying to reproduce the issue with the test case showed below: ```c #include <nuttx/config.h> #include <stdio.h> #include <pthread.h> #include <time.h> /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * hello_main ****************************************************************************/ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static void *test_thread(void *arg) { struct timespec time; clock_gettime(CLOCK_REALTIME, &time); printf("[%ld.%ld]get lock, curr_tick %ld\n", time.tv_sec, time.tv_nsec, clock_time2ticks(&time)); time.tv_sec += 2; pthread_mutex_timedlock(&mutex, &time); clock_gettime(CLOCK_REALTIME, &time); printf("[%ld.%ld]timed lock get failed, curr_tick %ld\n", time.tv_sec, time.tv_nsec, clock_time2ticks(&time)); return NULL; } int main(int argc, FAR char *argv[]) { pthread_t pthread; pthread_mutex_lock(&mutex); pthread_create(&pthread, NULL, (pthread_startroutine_t)test_thread, NULL); pthread_join(pthread, NULL); pthread_mutex_unlock(&mutex); return 0; } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org