summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/prwlockinit.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-27 14:16:12 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-31 08:29:44 +0200
commit23fec9f0e18dc4913fab818118f836af150b98f3 (patch)
tree66228f23bbf654117a33e28db7a017eea21fb785 /cpukit/posix/src/prwlockinit.c
parentscore: Use thread life protection for API mutexes (diff)
downloadrtems-23fec9f0e18dc4913fab818118f836af150b98f3.tar.bz2
score: PR2152: Use allocator mutex for objects
Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
Diffstat (limited to 'cpukit/posix/src/prwlockinit.c')
-rw-r--r--cpukit/posix/src/prwlockinit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/cpukit/posix/src/prwlockinit.c b/cpukit/posix/src/prwlockinit.c
index 488b46b8c4..94973f6b78 100644
--- a/cpukit/posix/src/prwlockinit.c
+++ b/cpukit/posix/src/prwlockinit.c
@@ -88,15 +88,10 @@ int pthread_rwlock_init(
*/
_CORE_RWLock_Initialize_attributes( &the_attributes );
- /*
- * Enter dispatching critical section to allocate and initialize RWLock
- */
- _Thread_Disable_dispatch(); /* prevents deletion */
-
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return EAGAIN;
}
@@ -110,6 +105,6 @@ int pthread_rwlock_init(
*rwlock = the_rwlock->Object.id;
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return 0;
}