summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-12 10:53:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-12 10:53:47 +0200
commit47c9c083ede43f9dfbd86212f308244aa19bfad3 (patch)
tree9f4b5e5ab2a89410c8eeb2d99bb30c9e8b634e6b
parentscore: Fix scheduler helping protocol (diff)
downloadrtems-47c9c083ede43f9dfbd86212f308244aa19bfad3.tar.bz2
score: Avoid Giant lock in _Objects_Id_to_name()
This prevents a deadlock situation in the capture engine.
-rw-r--r--cpukit/score/src/objectidtoname.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c
index ec2618519a..674f641ee5 100644
--- a/cpukit/score/src/objectidtoname.c
+++ b/cpukit/score/src/objectidtoname.c
@@ -31,6 +31,7 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
+ ISR_lock_Context lock_context;
/*
* Caller is trusted for name != NULL.
@@ -56,11 +57,16 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
return OBJECTS_INVALID_ID;
#endif
- the_object = _Objects_Get( information, tmpId, &ignored_location );
+ the_object = _Objects_Get_isr_disable(
+ information,
+ tmpId,
+ &ignored_location,
+ &lock_context
+ );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
- _Objects_Put( the_object );
+ _ISR_lock_ISR_enable( &lock_context );
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}