[a243fc6] | 1 | SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause |
---|
| 2 | brief: | |
---|
| 3 | Creates a task object. |
---|
| 4 | copyrights: |
---|
| 5 | - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) |
---|
| 6 | - Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR) |
---|
| 7 | definition: |
---|
| 8 | default: |
---|
[d3edaca] | 9 | attributes: null |
---|
[a243fc6] | 10 | body: null |
---|
| 11 | params: |
---|
[3bdf817] | 12 | - ${../../type/if/name:/name} ${.:/params[0]/name} |
---|
[a243fc6] | 13 | - ${priority:/name} ${.:/params[1]/name} |
---|
[3bdf817] | 14 | - ${/c/if/size_t:/name} ${.:/params[2]/name} |
---|
| 15 | - ${../../mode/if/mode:/name} ${.:/params[3]/name} |
---|
| 16 | - ${../../attr/if/attribute:/name} ${.:/params[4]/name} |
---|
| 17 | - ${../../type/if/id:/name} *${.:/params[5]/name} |
---|
| 18 | return: ${../../status/if/code:/name} |
---|
[a243fc6] | 19 | variants: [] |
---|
| 20 | description: | |
---|
| 21 | This directive creates a task which resides on the local node. It allocates |
---|
| 22 | and initializes a TCB, a stack, and an optional floating point context area. |
---|
| 23 | The mode parameter contains values which sets the taskâs initial execution |
---|
| 24 | mode. The RTEMS_FLOATING_POINT attribute should be specified if the created |
---|
| 25 | task is to use a numeric coprocessor. For performance reasons, it is |
---|
| 26 | recommended that tasks not using the numeric coprocessor should specify the |
---|
| 27 | RTEMS_NO_FLOATING_POINT attribute. If the RTEMS_GLOBAL attribute is |
---|
| 28 | specified, the task can be accessed from remote nodes. The task id, returned |
---|
| 29 | in id, is used in other task related directives to access the task. When |
---|
| 30 | created, a task is placed in the dormant state and can only be made ready to |
---|
| 31 | execute using the directive rtems_task_start(). |
---|
| 32 | enabled-by: true |
---|
[5f97799] | 33 | index-entries: [] |
---|
[a243fc6] | 34 | interface-type: function |
---|
| 35 | links: |
---|
| 36 | - role: interface-placement |
---|
| 37 | uid: header |
---|
| 38 | - role: interface-ingroup |
---|
[cead53e] | 39 | uid: group |
---|
[a243fc6] | 40 | name: rtems_task_create |
---|
| 41 | notes: null |
---|
| 42 | params: |
---|
| 43 | - description: is the user-defined task name. |
---|
| 44 | dir: null |
---|
| 45 | name: name |
---|
| 46 | - description: is the initial task priority. |
---|
| 47 | dir: null |
---|
| 48 | name: initial_priority |
---|
| 49 | - description: is the task stack size in bytes. |
---|
| 50 | dir: null |
---|
| 51 | name: stack_size |
---|
| 52 | - description: is the initial task mode. |
---|
| 53 | dir: null |
---|
| 54 | name: initial_modes |
---|
| 55 | - description: is the task attribute set. |
---|
| 56 | dir: null |
---|
| 57 | name: attribute_set |
---|
| 58 | - description: | |
---|
| 59 | is the pointer to an object identifier variable. The object identifier of |
---|
| 60 | the new task will be stored in this variable, in case of a successful |
---|
| 61 | operation. |
---|
| 62 | dir: out |
---|
| 63 | name: id |
---|
| 64 | return: |
---|
| 65 | return: null |
---|
| 66 | return-values: |
---|
| 67 | - description: | |
---|
| 68 | The requested operation was successful. |
---|
[3bdf817] | 69 | value: ${../../status/if/successful:/name} |
---|
[a243fc6] | 70 | - description: | |
---|
[3bdf817] | 71 | The ${.:/params[5]/name} parameter was ${/c/if/null:/name}. |
---|
| 72 | value: ${../../status/if/invalid-address:/name} |
---|
[a243fc6] | 73 | - description: | |
---|
| 74 | The task name was invalid. |
---|
[3bdf817] | 75 | value: ${../../status/if/invalid-name:/name} |
---|
[a243fc6] | 76 | - description: | |
---|
| 77 | The initial task priority was invalid. |
---|
[3bdf817] | 78 | value: ${../../status/if/invalid-priority:/name} |
---|
[a243fc6] | 79 | - description: | |
---|
| 80 | The multiprocessing support was not configured. |
---|
[3bdf817] | 81 | value: ${../../status/if/mp-not-configured:/name} |
---|
[a243fc6] | 82 | - description: | |
---|
| 83 | There was no inactive task object available to create a new task. |
---|
[3bdf817] | 84 | value: ${../../status/if/too-many:/name} |
---|
[a243fc6] | 85 | - description: | |
---|
| 86 | In multiprocessing configurations, there was no inactive global object |
---|
| 87 | available to create a new global task. |
---|
[3bdf817] | 88 | value: ${../../status/if/too-many:/name} |
---|
[a243fc6] | 89 | - description: | |
---|
| 90 | There was not enough memory to allocate the task storage area. The task |
---|
| 91 | storage area contains the task stack, the thread-local storage, and the |
---|
| 92 | floating point context. |
---|
[3bdf817] | 93 | value: ${../../status/if/unsatisfied:/name} |
---|
[a243fc6] | 94 | - description: | |
---|
| 95 | One of the task create extensions failed to create the new task. |
---|
[3bdf817] | 96 | value: ${../../status/if/unsatisfied:/name} |
---|
[a243fc6] | 97 | - description: | |
---|
| 98 | In SMP configurations, the non-preemption mode was not supported. |
---|
[3bdf817] | 99 | value: ${../../status/if/unsatisfied:/name} |
---|
[a243fc6] | 100 | - description: | |
---|
| 101 | In SMP configurations, the interrupt level mode was not supported. |
---|
[3bdf817] | 102 | value: ${../../status/if/unsatisfied:/name} |
---|
[a243fc6] | 103 | type: interface |
---|