MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / pthread_getschedparam

Function pthread_getschedparam

components/libc/posix/pthreads/pthread.c:822–831  ·  view source on GitHub ↗

* @brief Retrieves the scheduling policy and parameters of a thread. * * The `pthread_getschedparam` function retrieves the scheduling policy and the scheduling parameters * (such as priority) for the specified thread. This allows you to check the scheduling settings of a thread * and can be useful for thread management and performance tuning in a multithreaded application. * * @param[in] th

Source from the content-addressed store, hash-verified

820 * @see pthread_setschedparam, sched_getparam
821 */
822int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param)
823{
824 _pthread_data_t *ptd;
825
826 ptd = _pthread_get_data(thread);
827 pthread_attr_getschedpolicy(&ptd->attr, policy);
828 pthread_attr_getschedparam(&ptd->attr, param);
829
830 return 0;
831}
832RTM_EXPORT(pthread_getschedparam);
833
834/**

Callers

nothing calls this directly

Calls 3

_pthread_get_dataFunction · 0.85

Tested by

no test coverage detected