1 | SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause |
---|
2 | brief: | |
---|
3 | Sends an event set to a task. |
---|
4 | copyrights: |
---|
5 | - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) |
---|
6 | - Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) |
---|
7 | definition: |
---|
8 | default: |
---|
9 | attributes: null |
---|
10 | body: null |
---|
11 | params: |
---|
12 | - ${../../type/if/id:/name} ${.:/params[0]/name} |
---|
13 | - ${set:/name} ${.:/params[1]/name} |
---|
14 | return: ${../../status/if/code:/name} |
---|
15 | variants: [] |
---|
16 | description: | |
---|
17 | This directive sends an event set, ``${.:/params[1]/name}``, to the task |
---|
18 | specified by ``${.:/params[0]/name}``. Based upon the state of the target |
---|
19 | task, one of the following situations applies: |
---|
20 | |
---|
21 | * The target task is blocked waiting for events, then |
---|
22 | |
---|
23 | * if the waiting task's input event condition is satisfied, then the task |
---|
24 | is made ready for execution, or |
---|
25 | |
---|
26 | * otherwise, the event set is posted but left pending and the task remains |
---|
27 | blocked. |
---|
28 | |
---|
29 | * The target task is not waiting for events, then the event set is posted and |
---|
30 | left pending. |
---|
31 | enabled-by: true |
---|
32 | index-entries: [] |
---|
33 | interface-type: function |
---|
34 | links: |
---|
35 | - role: interface-placement |
---|
36 | uid: header |
---|
37 | - role: interface-ingroup |
---|
38 | uid: group |
---|
39 | name: rtems_event_send |
---|
40 | notes: | |
---|
41 | Events can be sent by tasks or an ${/glossary/isr:/term}. |
---|
42 | |
---|
43 | Specifying ${../../task/if/self-define:/name} for ``${.:/params[0]/name}`` results |
---|
44 | in the event set being sent to the calling task. |
---|
45 | |
---|
46 | The event set to send shall be built by a *bitwise or* of the desired events. |
---|
47 | The set of valid events is ${event-00:/name} through ${event-31:/name}. If |
---|
48 | an event is not explicitly specified in the set, then it is not present. |
---|
49 | |
---|
50 | Identical events sent to a task are not queued. In other words, the second, |
---|
51 | and subsequent, posting of an event to a task before it can perform an |
---|
52 | ${receive:/name} has no effect. |
---|
53 | |
---|
54 | The calling task will be preempted if it has preemption enabled and a higher |
---|
55 | priority task is unblocked as the result of this directive. |
---|
56 | |
---|
57 | Sending an event set to a global task which does not reside on the local node |
---|
58 | will generate a request telling the remote node to send the event set to the |
---|
59 | appropriate task. |
---|
60 | params: |
---|
61 | - description: is the identifier of the target task to receive the event set. |
---|
62 | dir: null |
---|
63 | name: id |
---|
64 | - description: is the event set to send. |
---|
65 | dir: null |
---|
66 | name: event_in |
---|
67 | return: |
---|
68 | return: null |
---|
69 | return-values: |
---|
70 | - description: | |
---|
71 | The requested operation was successful. |
---|
72 | value: ${../../status/if/successful:/name} |
---|
73 | - description: | |
---|
74 | There was no task with the specified identifier. |
---|
75 | value: ${../../status/if/invalid-id:/name} |
---|
76 | type: interface |
---|