Modified calls to _Thread_Change_priority to take a third argument. The new

argument indicates whether the task is to be placed at the head or tail of
its priority fifo when it is lowering its own priority.  POSIX normally
follows the RTEMS API conventions but GNAT expects that all lowering of
a task's priority by the task itself will result in being placed at the
head of the priority FIFO.  Normally, this would only occur as the result
of lose of inherited priority.

The RTEMS API always puts tasks at the end of their priority group except
upon loss of inherited priority.
This commit is contained in:
Joel Sherrill
1997-03-08 03:51:09 +00:00
parent 232d6c1cf1
commit dab057a9b3
2 changed files with 2 additions and 2 deletions

View File

@@ -736,7 +736,7 @@ rtems_status_code rtems_task_set_priority(
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority );
_Thread_Change_priority( the_thread, new_priority, FALSE );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;

View File

@@ -736,7 +736,7 @@ rtems_status_code rtems_task_set_priority(
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority );
_Thread_Change_priority( the_thread, new_priority, FALSE );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;