* @brief Retrieves the clock ID for the specified thread. * * The `pthread_getcpuclockid` function retrieves the clock ID associated with the CPU time used * by the specified thread. * * @param[in] thread * The thread whose CPU clock ID is to be retrieved. If the thread is the calling thread, * the current thread's ID is used. * * @param[out] clock_id * A pointer to a `clockid_t` v
| 705 | * @see clock_gettime, pthread_create, pthread_self |
| 706 | */ |
| 707 | int pthread_getcpuclockid(pthread_t thread, clockid_t *clock_id) |
| 708 | { |
| 709 | if(_pthread_get_data(thread) == NULL) |
| 710 | { |
| 711 | return EINVAL; |
| 712 | } |
| 713 | |
| 714 | *clock_id = (clockid_t)rt_tick_get(); |
| 715 | |
| 716 | return 0; |
| 717 | } |
| 718 | RTM_EXPORT(pthread_getcpuclockid); |
| 719 | |
| 720 | /** |
nothing calls this directly
no test coverage detected