Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OS_OBJ_QTY  OSFlagPendAbort (OS_SEM  *p_grp,

...

                             OS_OPT   opt,

...

                             OS_ERR  *p_err)

...

...

File

...

Called from

...

Code enabled by

...

os_flag.c

...

...

Task only

...

...

OS_CFG_FLAG_EN and OS_CFG_FLAG_PEND_ABORT_EN

...

1000115OSFlagPendAbort() aborts and readies any tasks currently waiting on an event flag group. This function would be used by another task to fault abort the wait on the event flag group, rather than to normally signal the event flag group via OSFlagPost(). Anchor10001161000116

Arguments

...

p_grp Anchor10001181000118

is a pointer to the event flag group for which pend(s) must be aborted.

...

opt Anchor10001201000120

determines the type of abort performed.

...

classWebWorks_Indent_1

...

OS_OPT_PEND_ABORT_1

...

classWebWorks_Indent_2

...

Aborts the pend of only the highest priority task waiting on the event flag group.

...

classWebWorks_Indent_1

...

...

OS_OPT_PEND_ABORT_ALL

...

classWebWorks_Indent_2

...

Aborts the pend of all the tasks waiting on the event flag group.

...

classWebWorks_Indent_1

...

OS_OPT_POST_NO_SCHED

...

classWebWorks_Indent_2

...

Specifies that the scheduler should not be called even if the pend of a higher priority task is aborted. Scheduling will need to occur from another function.

...

classWebWorks_Indent_2

...

You would use this option if the task calling OSFlagPendAbort() will perform additional pend aborts, rescheduling will take place at completion, and when multiple pend aborts are to take effect simultaneously.

...

1000128p_err Anchor10001291000129

is a pointer to a variable that holds an error code. OSFlagPendAbort() sets *p_err to one of the following:

...

classWebWorks_Indent_1

...

...

OS_ERR_NONE

...

classWebWorks_Indent_2

...

at least one task waiting on the event flag group was readied and informed of the aborted wait. The return value indicates the number of tasks where a wait on the event flag group was aborted.

...

...

OS_ERR_OBJ_PTR_NULL

...

...

if OS_CFG_ARG_CHK_EN is set to 1 in os_cfg.h: if p_grp is a NULL pointer.

...

classWebWorks_Indent_1

...

OS_ERR_OBJ_TYPE

...

classWebWorks_Indent_2

...

if OS_CFG_OBJ_TYPE_CHK_EN is set to 1 in os_cfg.h: if p_grp is not pointing to an event flag group.

...

classWebWorks_Indent_1

...

...

OS_ERR_OPT_INVALID

...

classWebWorks_Indent_2

...

if OS_CFG_ARG_CHK_EN is set to 1 in os_cfg.h: if specifying an invalid option.

...

classWebWorks_Indent_1

...

OS_ERR_PEND_ABORT_ISR

...

classWebWorks_Indent_2

...

...

if OS_CFG_CALLED_FROM_ISR_CHK_EN set to 1 in os_cfg.h: This function cannot be called from an ISR.

...

classWebWorks_Indent_1

...

OS_ERR_PEND_ABORT_NONE

...

classWebWorks_Indent_2

...

No task was aborted since no task was waiting.

...

Returned Value

...

OSFlagPendAbort() returns the number of tasks made ready-to-run by this function. Zero indicates that no tasks were pending on the event flag group and thus this function had no effect. Anchor10510861051086

Notes/Warnings

...

1051087Event flag groups must be created before they are used. Anchor10511491051149

Example

...

rowspan20

...