1570af302Sopenharmony_ci#include <time.h> 2570af302Sopenharmony_ci#include <limits.h> 3570af302Sopenharmony_ci#include "pthread_impl.h" 4570af302Sopenharmony_ci 5570af302Sopenharmony_ciint timer_getoverrun(timer_t t) 6570af302Sopenharmony_ci{ 7570af302Sopenharmony_ci if ((intptr_t)t < 0) { 8570af302Sopenharmony_ci pthread_t td = (void *)((uintptr_t)t << 1); 9570af302Sopenharmony_ci t = (void *)(uintptr_t)(td->timer_id & INT_MAX); 10570af302Sopenharmony_ci } 11570af302Sopenharmony_ci return syscall(SYS_timer_getoverrun, t); 12570af302Sopenharmony_ci} 13