summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadget.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-20 09:45:10 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-21 08:25:32 +0200
commit1041de1ab071d126148f0c02e5da0db637001f1c (patch)
tree07c077b044a14d2abca32e8f9a453eec1141431e /cpukit/score/src/threadget.c
parentscore: Modify _Thread_Dispatch_disable_critical() (diff)
downloadrtems-1041de1ab071d126148f0c02e5da0db637001f1c.tar.bz2
score: Add _Thread_Get_interrupt_disable()
Remove _Thread_Acquire() and _Thread_Acquire_for_executing(). Add utility functions for the default thread lock. Use the default thread lock for the RTEMS events. There is no need to disable thread dispatching and a Giant acquire in _Event_Timeout() since this was already done by the caller. Update #2273.
Diffstat (limited to 'cpukit/score/src/threadget.c')
-rw-r--r--cpukit/score/src/threadget.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
index 1091333059..45ea55f719 100644
--- a/cpukit/score/src/threadget.c
+++ b/cpukit/score/src/threadget.c
@@ -75,22 +75,7 @@ Thread_Control *_Thread_Get(
return (Thread_Control *) _Objects_Get( information, id, location );
}
-Thread_Control *_Thread_Acquire_executing( ISR_lock_Context *lock_context )
-{
- Thread_Control *executing;
-
-#if defined(RTEMS_SMP)
- _ISR_Disable_without_giant( lock_context->Lock_context.isr_level );
-#else
- _ISR_Disable( lock_context->isr_level );
-#endif
- executing = _Thread_Executing;
- _ISR_lock_Acquire( &executing->Object.Lock, lock_context );
-
- return executing;
-}
-
-Thread_Control *_Thread_Acquire(
+Thread_Control *_Thread_Get_interrupt_disable(
Objects_Id id,
Objects_Locations *location,
ISR_lock_Context *lock_context
@@ -100,7 +85,8 @@ Thread_Control *_Thread_Acquire(
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
*location = OBJECTS_LOCAL;
- return _Thread_Acquire_executing( lock_context );
+ _ISR_lock_ISR_disable( lock_context );
+ return _Thread_Executing;
}
information = _Thread_Get_objects_information( id );
@@ -110,5 +96,5 @@ Thread_Control *_Thread_Acquire(
}
return (Thread_Control *)
- _Objects_Acquire( information, id, location, lock_context );
+ _Objects_Get_isr_disable( information, id, location, lock_context );
}