Module: xenomai-3
Branch: stable-3.0.x
Commit: db4954a6cadc795b5574f9b57b889687df05a856
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=db4954a6cadc795b5574f9b57b889687df05a856

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Apr 12 10:28:00 2018 +0200

Revert "boilerplate/hash: drop preposterous PI for locking"

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.kis...@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 aa35fa4..17beb38 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);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to