Functions | |
| POSEXTERN POSFLAG_t POSCALL | posFlagCreate (void) |
| POSEXTERN void POSCALL | posFlagDestroy (POSFLAG_t flg) |
| POSEXTERN VAR_t POSCALL | posFlagSet (POSFLAG_t flg, UVAR_t flgnum) |
| POSEXTERN VAR_t POSCALL | posFlagGet (POSFLAG_t flg, UVAR_t mode) |
| POSEXTERN VAR_t POSCALL | posFlagWait (POSFLAG_t flg, UINT_t timeoutticks) |
| POSEXTERN POSFLAG_t POSCALL posFlagCreate | ( | void | ) |
Flag function. Allocates a flag object. A flag object behaves like an array of one bit semaphores. The object can hold up to MVAR_BITS - 1 flags. The flags can be used to simulate events, so a single thread can wait for several events simultaneously.
| POSEXTERN void POSCALL posFlagDestroy | ( | POSFLAG_t | flg | ) |
Flag function. Frees an unused flag object again.
| flg | handle to the flag object. |
Flag function. Pends on a flag object and waits until one of the flags in the flag object is set.
| flg | handle to the flag object. | |
| mode | can be POSFLAG_MODE_GETSINGLE or POSFLAG_MODE_GETMASK. |
Flag function. Sets a flag bit in the flag object and sets the task that pends on the flag object to running state.
| flg | handle to the flag object. | |
| flgnum | Number of the flag to set. The flag number must be in the range of 0 .. MVAR_BITS - 2. |
Flag function. Pends on a flag object and waits until one of the flags in the flag object is set or a timeout has happened.
| flg | handle to the flag object. | |
| timeoutticks | timeout in timer ticks (see HZ define and MS macro). If this parameter is set to zero, the function immediately returns. If this parameter is set to INFINITE, the function will never time out. |
1.5.4