feat(pthread): Adds set/get sched param funcs

Closes https://github.com/espressif/esp-idf/issues/14821
Closes https://github.com/espressif/esp-idf/issues/8594
This commit is contained in:
Konstantin Kondrashov
2024-11-08 16:29:20 +02:00
committed by BOT
parent 1689c7e14f
commit 3318e0accd
3 changed files with 131 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -20,6 +20,18 @@ int pthread_condattr_getclock(const pthread_condattr_t * attr, clockid_t * clock
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id);
/* Dynamic Thread Scheduling Parameters Access */
int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param);
int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param);
/* Set Scheduling Priority of a Thread */
int pthread_setschedprio(pthread_t thread, int prio);
int sched_get_priority_min(int policy);
int sched_get_priority_max(int policy);
#ifdef __cplusplus
}
#endif