about summary refs log tree commit diff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-14 23:11:18 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-14 23:11:18 +0000
commitf17efcb43e500d4af62b71bd6f286af831069b5a (patch)
treebf062a11f158b5bc8e33e42cc85e625751bacf94 /nptl/pthreadP.h
parent107b8a922a9f72bae8d066549c675062bee0897f (diff)
downloadglibc-f17efcb43e500d4af62b71bd6f286af831069b5a.tar.gz
glibc-f17efcb43e500d4af62b71bd6f286af831069b5a.tar.xz
glibc-f17efcb43e500d4af62b71bd6f286af831069b5a.zip
* sysdeps/powerpc/powerpc32/dl-trampoline.S (_dl_runtime_resolve):
	Don't clobber caller's LRSAVE.
	(_dl_prof_resolve): Likewise.
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r--nptl/pthreadP.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index dc98bb19c0..503e99b2b4 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -86,17 +86,31 @@ enum
   = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ERRORCHECK_NP,
   PTHREAD_MUTEX_PI_ROBUST_ADAPTIVE_NP
   = PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_ADAPTIVE_NP,
-  PTHREAD_MUTEX_PRIO_PROTECT_NP = 64
+  PTHREAD_MUTEX_PRIO_PROTECT_NP = 64,
+  PTHREAD_MUTEX_PP_NORMAL_NP
+  = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_NORMAL,
+  PTHREAD_MUTEX_PP_RECURSIVE_NP
+  = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_RECURSIVE_NP,
+  PTHREAD_MUTEX_PP_ERRORCHECK_NP
+  = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ERRORCHECK_NP,
+  PTHREAD_MUTEX_PP_ADAPTIVE_NP
+  = PTHREAD_MUTEX_PRIO_PROTECT_NP | PTHREAD_MUTEX_ADAPTIVE_NP
 };
-#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT	16
-#define PTHREAD_MUTEX_PRIO_CEILING_MASK		0x00ff0000
+
+/* Ceiling in __data.__lock.  __data.__lock is signed, so don't
+   use the MSB bit in there, but in the mask also include that bit,
+   so that the compiler can optimize & PTHREAD_MUTEX_PRIO_CEILING_MASK
+   masking if the value is then shifted down by
+   PTHREAD_MUTEX_PRIO_CEILING_SHIFT.  */
+#define PTHREAD_MUTEX_PRIO_CEILING_SHIFT	19
+#define PTHREAD_MUTEX_PRIO_CEILING_MASK		0xfff80000
 
 
 /* Flags in mutex attr.  */
 #define PTHREAD_MUTEXATTR_PROTOCOL_SHIFT	28
 #define PTHREAD_MUTEXATTR_PROTOCOL_MASK		0x30000000
-#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT	16
-#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK	0x00ff0000
+#define PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT	12
+#define PTHREAD_MUTEXATTR_PRIO_CEILING_MASK	0x00fff000
 #define PTHREAD_MUTEXATTR_FLAG_ROBUST		0x40000000
 #define PTHREAD_MUTEXATTR_FLAG_PSHARED		0x80000000
 #define PTHREAD_MUTEXATTR_FLAG_BITS \
@@ -151,6 +165,14 @@ extern unsigned int __nptl_nthreads attribute_hidden;
 extern int __set_robust_list_avail attribute_hidden;
 #endif
 
+/* Thread Priority Protection.  */
+extern int __sched_fifo_min_prio attribute_hidden;
+extern int __sched_fifo_max_prio attribute_hidden;
+extern void __init_sched_fifo_prio (void) attribute_hidden;
+extern int __pthread_tpp_change_priority (int prev_prio, int new_prio)
+     attribute_hidden;
+extern int __pthread_current_priority (void) attribute_hidden;
+
 /* The library can run in debugging mode where it performs a lot more
    tests.  */
 extern int __pthread_debug attribute_hidden;