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: |
---|
9 | attributes: null |
---|
10 | body: null |
---|
11 | params: |
---|
12 | - ${../../type/if/name:/name} ${.:/params[0]/name} |
---|
13 | - ${priority:/name} ${.:/params[1]/name} |
---|
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} |
---|
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 |
---|
33 | index-entries: [] |
---|
34 | interface-type: function |
---|
35 | links: |
---|
36 | - role: interface-placement |
---|
37 | uid: header |
---|
38 | - role: interface-ingroup |
---|
39 | uid: group |
---|
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. |
---|
69 | value: ${../../status/if/successful:/name} |
---|
70 | - description: | |
---|
71 | The ${.:/params[5]/name} parameter was ${/c/if/null:/name}. |
---|
72 | value: ${../../status/if/invalid-address:/name} |
---|
73 | - description: | |
---|
74 | The task name was invalid. |
---|
75 | value: ${../../status/if/invalid-name:/name} |
---|
76 | - description: | |
---|
77 | The initial task priority was invalid. |
---|
78 | value: ${../../status/if/invalid-priority:/name} |
---|
79 | - description: | |
---|
80 | The multiprocessing support was not configured. |
---|
81 | value: ${../../status/if/mp-not-configured:/name} |
---|
82 | - description: | |
---|
83 | There was no inactive task object available to create a new task. |
---|
84 | value: ${../../status/if/too-many:/name} |
---|
85 | - description: | |
---|
86 | In multiprocessing configurations, there was no inactive global object |
---|
87 | available to create a new global task. |
---|
88 | value: ${../../status/if/too-many:/name} |
---|
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. |
---|
93 | value: ${../../status/if/unsatisfied:/name} |
---|
94 | - description: | |
---|
95 | One of the task create extensions failed to create the new task. |
---|
96 | value: ${../../status/if/unsatisfied:/name} |
---|
97 | - description: | |
---|
98 | In SMP configurations, the non-preemption mode was not supported. |
---|
99 | value: ${../../status/if/unsatisfied:/name} |
---|
100 | - description: | |
---|
101 | In SMP configurations, the interrupt level mode was not supported. |
---|
102 | value: ${../../status/if/unsatisfied:/name} |
---|
103 | type: interface |
---|