* @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
| 820 | * @see pthread_setschedparam, sched_getparam |
| 821 | */ |
| 822 | int 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 | } |
| 832 | RTM_EXPORT(pthread_getschedparam); |
| 833 | |
| 834 | /** |
nothing calls this directly
no test coverage detected