Versions Compared

Key

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

...

OS

...

_SEM_CTR  OSTaskSemSet (OS_TCB     *p_tcb,

...

                          OS_SEM_CTR  cnt;

...

                          OS_ERR     *p_err)

...

File

...

...

Called from

...

Code enabled by

...

...

os_task.c

...

Task or ISR

...

Always Enabled

...

10057961005796OSTaskSemSet() allows the user to set the value of the task’s signal counter. You would set the signal counter of the calling task by passing a NULL pointer for p_tcb. Anchor10057971005797

Arguments

...

1005798p_tcb Anchor10057991005799

is a pointer to the task’s OS_TCB to clear the signal counter. A NULL pointer indicates that the user wants to clear the caller’s signal counter.

Anchor10058001005800cnt Anchor10058031005803

the desired value for the task semaphore counter.

...

1005804p_err Anchor10058051005805

is a pointer to a variable that will contain an error code returned by this function.

...

...

OS_ERR_NONE

...

...

classWebWorks_Indent_2

...

if the call was successful and the signal counter was cleared.

...

...

OS_ERR_SET_ISR

...

classWebWorks_Indent_2

...

...

if OS_CFG_CALLED_FROM_ISR_CHK_EN set to 1 in os_cfg.h: if calling this function from an ISR

...

Returned Value

Anchor10058111005811The value of the signal counter prior to setting it. Anchor10058121005812

Notes/Warnings

Anchor10058131005813None Anchor10058631005863

Example

...

rowspan15

...