summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasks.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 16:54:17 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 16:54:17 +0000
commit7a035ebcc006d0195c660b71cc92609c99d635ba (patch)
tree6f69564a306d2f356a83f9711ff057d3abde2c10 /cpukit/rtems/src/tasks.c
parentPatch from Eric Valette <valette@crf.canon.fr>: (diff)
downloadrtems-7a035ebcc006d0195c660b71cc92609c99d635ba.tar.bz2
Added system task attribute to allow one to create a task with "0" priority
via the user api.
Diffstat (limited to 'cpukit/rtems/src/tasks.c')
-rw-r--r--cpukit/rtems/src/tasks.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 81955cd305..723a769836 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -269,15 +269,6 @@ rtems_status_code rtems_task_create(
#endif
/*
- * Validate the RTEMS API priority and convert it to the core priority range.
- */
-
- if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
- return RTEMS_INVALID_PRIORITY;
-
- core_priority = _RTEMS_tasks_Priority_to_Core( initial_priority );
-
- /*
* Fix the attribute set to match the attributes which
* this processor (1) requires and (2) is able to support.
* First add in the required flags for attribute_set
@@ -295,6 +286,17 @@ rtems_status_code rtems_task_create(
else
is_fp = FALSE;
+ /*
+ * Validate the RTEMS API priority and convert it to the core priority range.
+ */
+
+ if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
+ if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
+ return RTEMS_INVALID_PRIORITY;
+ }
+
+ core_priority = _RTEMS_tasks_Priority_to_Core( initial_priority );
+
if ( _Attributes_Is_global( the_attribute_set ) ) {
is_global = TRUE;