1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

nptl: Move the internal thread priority protection symbols into libc

This is a prerequisite for moving the mutex implementation.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2021-04-21 19:49:51 +02:00
parent eb29dcde31
commit 798cacde76
4 changed files with 21 additions and 8 deletions

View File

@ -25,9 +25,10 @@
#include <stdlib.h>
#include <atomic.h>
int __sched_fifo_min_prio = -1;
libc_hidden_data_def (__sched_fifo_min_prio)
int __sched_fifo_max_prio = -1;
libc_hidden_data_def (__sched_fifo_max_prio)
/* We only want to initialize __sched_fifo_min_prio and __sched_fifo_max_prio
once. The standard solution would be similar to pthread_once, but then
@ -47,6 +48,7 @@ __init_sched_fifo_prio (void)
atomic_store_relaxed (&__sched_fifo_min_prio,
__sched_get_priority_min (SCHED_FIFO));
}
libc_hidden_def (__init_sched_fifo_prio)
int
__pthread_tpp_change_priority (int previous_prio, int new_prio)
@ -155,6 +157,7 @@ __pthread_tpp_change_priority (int previous_prio, int new_prio)
return result;
}
libc_hidden_def (__pthread_tpp_change_priority)
int
__pthread_current_priority (void)
@ -193,3 +196,4 @@ __pthread_current_priority (void)
return result;
}
libc_hidden_def (__pthread_current_priority)