All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] Revert "boilerplate/hash: drop preposterous PI for locking"
@ 2018-04-12  8:28 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2018-04-12  8:28 UTC (permalink / raw)
  To: Xenomai

This reverts commit 0f19393b3702705c8470147b6a3fd03a08b42642.

No reason was given back then, and we there is the risk that this code
is used by prio-sensitive threads. Moreover, pvhash still used PI -
unless it is mapped on plain hash in case of !CONFIG_XENO_PSHARED.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 lib/boilerplate/hash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/boilerplate/hash.c b/lib/boilerplate/hash.c
index aa35fa475..17beb385c 100644
--- a/lib/boilerplate/hash.c
+++ b/lib/boilerplate/hash.c
@@ -101,6 +101,7 @@ void __hash_init(void *heap, struct hash_table *t)
 
 	pthread_mutexattr_init(&mattr);
 	pthread_mutexattr_settype(&mattr, mutex_type_attribute);
+	pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
 	pthread_mutexattr_setpshared(&mattr, mutex_scope_attribute);
 	__RT(pthread_mutex_init(&t->lock, &mattr));
 	pthread_mutexattr_destroy(&mattr);
-- 
2.13.6


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-12  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12  8:28 [Xenomai] [PATCH] Revert "boilerplate/hash: drop preposterous PI for locking" Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.