posix: internal: make priority / policy transforms available
Two functions can be used with relative ease to convert between Zephyr and POSIX priorities and policies. Namely, uint32_t zephyr_to_posix_priority(int32_t z_prio, int *policy) int32_t posix_to_zephyr_priority(uint32_t priority, int policy) These are not necessarily public API, but they helped with the POSIX Philosophers Sample, which is in a subsequent commit. Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
parent
cf14d4f1fd
commit
e357ba835d
1 changed files with 3 additions and 0 deletions
|
|
@ -102,4 +102,7 @@ struct posix_thread *to_posix_thread(pthread_t pth);
|
|||
/* get and possibly initialize a posix_mutex */
|
||||
struct k_mutex *to_posix_mutex(pthread_mutex_t *mu);
|
||||
|
||||
int posix_to_zephyr_priority(int priority, int policy);
|
||||
int zephyr_to_posix_priority(int priority, int *policy);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue