mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 20:52:40 +08:00
rtems: Avoid Giant lock for events
This commit is contained in:
@@ -86,7 +86,6 @@ void _Event_Seize(
|
||||
|
||||
cpu_self = _Thread_Dispatch_disable_critical( lock_context );
|
||||
_Thread_Lock_release_default( executing, lock_context );
|
||||
_Giant_Acquire( cpu_self );
|
||||
|
||||
if ( ticks ) {
|
||||
_Thread_Wait_set_timeout_code( executing, RTEMS_TIMEOUT );
|
||||
@@ -111,6 +110,5 @@ void _Event_Seize(
|
||||
_Thread_Unblock( executing );
|
||||
}
|
||||
|
||||
_Giant_Release( cpu_self );
|
||||
_Thread_Dispatch_enable( cpu_self );
|
||||
}
|
||||
|
||||
@@ -109,12 +109,10 @@ void _Event_Surrender(
|
||||
|
||||
cpu_self = _Thread_Dispatch_disable_critical( lock_context );
|
||||
_Thread_Lock_release_default( the_thread, lock_context );
|
||||
_Giant_Acquire( cpu_self );
|
||||
|
||||
_Watchdog_Remove_ticks( &the_thread->Timer );
|
||||
_Thread_Unblock( the_thread );
|
||||
|
||||
_Giant_Release( cpu_self );
|
||||
_Thread_Dispatch_enable( cpu_self );
|
||||
} else {
|
||||
_Thread_Lock_release_default( the_thread, lock_context );
|
||||
|
||||
Reference in New Issue
Block a user