RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
event.h File Reference

This header file provides the Event Manager API. More...

#include <stdint.h>
#include <rtems/rtems/options.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>

Go to the source code of this file.

Macros

#define RTEMS_ALL_EVENTS   0xffffffff
 This event set constant represents all events of an event set.
 
#define RTEMS_EVENT_0   0x00000001
 This event set constant represents the bit in the event set associated with event 0.
 
#define RTEMS_EVENT_1   0x00000002
 This event set constant represents the bit in the event set associated with event 1.
 
#define RTEMS_EVENT_2   0x00000004
 This event set constant represents the bit in the event set associated with event 2.
 
#define RTEMS_EVENT_3   0x00000008
 This event set constant represents the bit in the event set associated with event 3.
 
#define RTEMS_EVENT_4   0x00000010
 This event set constant represents the bit in the event set associated with event 4.
 
#define RTEMS_EVENT_5   0x00000020
 This event set constant represents the bit in the event set associated with event 5.
 
#define RTEMS_EVENT_6   0x00000040
 This event set constant represents the bit in the event set associated with event 6.
 
#define RTEMS_EVENT_7   0x00000080
 This event set constant represents the bit in the event set associated with event 7.
 
#define RTEMS_EVENT_8   0x00000100
 This event set constant represents the bit in the event set associated with event 8.
 
#define RTEMS_EVENT_9   0x00000200
 This event set constant represents the bit in the event set associated with event 9.
 
#define RTEMS_EVENT_10   0x00000400
 This event set constant represents the bit in the event set associated with event 10.
 
#define RTEMS_EVENT_11   0x00000800
 This event set constant represents the bit in the event set associated with event 11.
 
#define RTEMS_EVENT_12   0x00001000
 This event set constant represents the bit in the event set associated with event 12.
 
#define RTEMS_EVENT_13   0x00002000
 This event set constant represents the bit in the event set associated with event 13.
 
#define RTEMS_EVENT_14   0x00004000
 This event set constant represents the bit in the event set associated with event 14.
 
#define RTEMS_EVENT_15   0x00008000
 This event set constant represents the bit in the event set associated with event 15.
 
#define RTEMS_EVENT_16   0x00010000
 This event set constant represents the bit in the event set associated with event 16.
 
#define RTEMS_EVENT_17   0x00020000
 This event set constant represents the bit in the event set associated with event 17.
 
#define RTEMS_EVENT_18   0x00040000
 This event set constant represents the bit in the event set associated with event 18.
 
#define RTEMS_EVENT_19   0x00080000
 This event set constant represents the bit in the event set associated with event 19.
 
#define RTEMS_EVENT_20   0x00100000
 This event set constant represents the bit in the event set associated with event 20.
 
#define RTEMS_EVENT_21   0x00200000
 This event set constant represents the bit in the event set associated with event 21.
 
#define RTEMS_EVENT_22   0x00400000
 This event set constant represents the bit in the event set associated with event 22.
 
#define RTEMS_EVENT_23   0x00800000
 This event set constant represents the bit in the event set associated with event 23.
 
#define RTEMS_EVENT_24   0x01000000
 This event set constant represents the bit in the event set associated with event 24.
 
#define RTEMS_EVENT_25   0x02000000
 This event set constant represents the bit in the event set associated with event 25.
 
#define RTEMS_EVENT_26   0x04000000
 This event set constant represents the bit in the event set associated with event 26.
 
#define RTEMS_EVENT_27   0x08000000
 This event set constant represents the bit in the event set associated with event 27.
 
#define RTEMS_EVENT_28   0x10000000
 This event set constant represents the bit in the event set associated with event 28.
 
#define RTEMS_EVENT_29   0x20000000
 This event set constant represents the bit in the event set associated with event 29.
 
#define RTEMS_EVENT_30   0x40000000
 This event set constant represents the bit in the event set associated with event 30.
 
#define RTEMS_EVENT_31   0x80000000
 This event set constant represents the bit in the event set associated with event 31.
 
#define RTEMS_PENDING_EVENTS   0
 This event set constant indicates that rtems_event_receive() shall return the set of pending events.
 
#define RTEMS_EVENT_SYSTEM_LIO_LIST_COMPLETED   RTEMS_EVENT_28
 This event set constant represents the reserved system event internally used to notify list completion when lio_listio is called using LIO_WAIT.
 
#define RTEMS_EVENT_SYSTEM_NETWORK_CLOSE   RTEMS_EVENT_26
 This event set constant represents the reserved system event for a network socket close.
 
#define RTEMS_EVENT_SYSTEM_NETWORK_SBWAIT   RTEMS_EVENT_24
 This event set constant represents the reserved system event for a network socket buffer wait usage.
 
#define RTEMS_EVENT_SYSTEM_NETWORK_SOSLEEP   RTEMS_EVENT_25
 This event set constant represents the reserved system event for a network socket sleep.
 
#define RTEMS_EVENT_SYSTEM_SERVER   RTEMS_EVENT_30
 This event set constant represents the reserved system event for server thread usage, for example the timer or interrupt server.
 
#define RTEMS_EVENT_SYSTEM_SERVER_RESUME   RTEMS_EVENT_29
 This event set constant represents the reserved system event to resume a server thread, for example the timer or interrupt server.
 
#define RTEMS_EVENT_SYSTEM_TRANSIENT   RTEMS_EVENT_31
 This event set constant represents the reserved system event for transient usage.
 

Typedefs

typedef uint32_t rtems_event_set
 This integer type represents a bit field which can hold exactly 32 individual events.
 

Functions

rtems_status_code rtems_event_system_receive (rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out)
 Receives or gets a system event set from the executing task.
 
rtems_status_code rtems_event_system_send (rtems_id id, rtems_event_set event_in)
 Sends the system event set to the task.
 
rtems_status_code rtems_event_send (rtems_id id, rtems_event_set event_in)
 Sends the event set to the task.
 
rtems_status_code rtems_event_receive (rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out)
 Receives or gets an event set from the calling task.
 

Detailed Description

This header file provides the Event Manager API.

Function Documentation

◆ rtems_event_system_receive()

rtems_status_code rtems_event_system_receive ( rtems_event_set  event_in,
rtems_option  option_set,
rtems_interval  ticks,
rtems_event_set event_out 
)

Receives or gets a system event set from the executing task.

Parameters
event_inis the event set of interest. Use RTEMS_PENDING_EVENTS to get the pending events.
option_setis the option set.
ticksis the timeout in clock ticks if the RTEMS_WAIT option was set. Use RTEMS_NO_TIMEOUT to wait potentially forever.
event_outis the pointer to an event set. The received or pending events are stored in the referenced event set if the operation was successful.

This directive performs the same actions as the rtems_event_receive() directive except that it operates with a different set of events for each task.

Constraints

The following constraints apply to this directive:

  • The directive may be called from within device driver initialization context.
  • The directive may be called from within task context.
  • The timeout functionality of the directive requires a clock tick.

◆ rtems_event_system_send()

rtems_status_code rtems_event_system_send ( rtems_id  id,
rtems_event_set  event_in 
)

Sends the system event set to the task.

Parameters
idis the identifier of the target task to receive the event set.
event_inis the event set to send.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within interrupt context.
  • The directive may be called from within device driver initialization context.
  • The directive may be called from within task context.
  • The directive may unblock a task. This may cause the calling task to be preempted.