Made all calls to _Thread_Yield_processor consistent in how they are

wrapped by calls to _Thread_Enable_dispatch and _Thread_Disable_dispatch.
This commit is contained in:
Joel Sherrill
1999-05-07 17:09:20 +00:00
parent 16775a5535
commit 5a909149ca
4 changed files with 18 additions and 18 deletions

View File

@@ -314,8 +314,9 @@ int nanosleep(
*/
if ( !ticks ) {
_Thread_Yield_processor();
_Thread_Dispatch();
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;

View File

@@ -1055,11 +1055,10 @@ rtems_status_code rtems_task_wake_after(
rtems_interval ticks
)
{
if ( ticks == 0 ) {
_Thread_Yield_processor();
_Thread_Dispatch();
} else {
_Thread_Disable_dispatch();
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Thread_Yield_processor();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
_Watchdog_Initialize(
&_Thread_Executing->Timer,
@@ -1068,8 +1067,8 @@ rtems_status_code rtems_task_wake_after(
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
}
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}

View File

@@ -314,8 +314,9 @@ int nanosleep(
*/
if ( !ticks ) {
_Thread_Yield_processor();
_Thread_Dispatch();
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;

View File

@@ -1055,11 +1055,10 @@ rtems_status_code rtems_task_wake_after(
rtems_interval ticks
)
{
if ( ticks == 0 ) {
_Thread_Yield_processor();
_Thread_Dispatch();
} else {
_Thread_Disable_dispatch();
_Thread_Disable_dispatch();
if ( ticks == 0 ) {
_Thread_Yield_processor();
} else {
_Thread_Set_state( _Thread_Executing, STATES_DELAYING );
_Watchdog_Initialize(
&_Thread_Executing->Timer,
@@ -1068,8 +1067,8 @@ rtems_status_code rtems_task_wake_after(
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
}
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}