Real-Time Embedded Multithreading: Using ThreadX and ARM

Appendix C: Event Flags Group Services

The event flags group services described in this appendix are:

tx_event_flags_create

Create an event flags group

tx_event_flags_delete

Delete an event flags group

tx_event_flags_get

Get event flags from an event flags group

tx_event_flags_info_get

Retrieve information about an event flags group

tx_event_flags_set

Set event flags in an event flags group

tx_event_flags_create

Create an event flags group

Prototype

UINT <b class="bold">tx_event_flags_create</b>(TX_EVENT_FLAGS_GROUP <b class="bold">*group_ptr,</b>                           CHAR <b class="bold">*name_ptr</b>)

Description

This service creates a group of 32 event flags. All 32 event flags in the group are initialized to zero. Each event flag is represented by a single bit. This service initializes the group Control Block through the parameter group_ptr.

Input Parameters

name_ptr

Pointer to the name of the event flags group.

group_ptr

Pointer to an Event Flags Group Control Block.

Return Values

TX_SUCCESS 1

(0x00)

Successful event group creation.

TX_GROUP_ERROR

(0x06)

Invalid event group pointer. Either the pointer is NULL or the event group has already been created.

TX_CALLER_ERROR

(0x13)

Invalid caller of this service.

[78]

Allowed From

Initialization and threads

Preemption Possible

No

Example

TX_EVENT_FLAGS_GROUP my_event_group;UINT status;/* Create an event flags group. */status = <b class="bold">tx_event_flags_create</b>(&my_event_group,                               "my_event_group_name");/* If status equals TX_SUCCESS, my_event_group is ready   for get...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Banner and Flag Making Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.