PMPlib miscellaneous routines
[PMPlib APIs]
PMPlib miscellaneous routines provide the utility for a driver module.
More...Functions | |
PMPAPI uint32_t | pmplib_interlocked_increment (uint32_t *count) |
Increment a variable value and check the resultant value. | |
PMPAPI uint32_t | pmplib_interlocked_decrement (uint32_t *count) |
Decrement a variable value and check the resultant value. |
Detailed Description
PMPlib miscellaneous routines provide the utility for a driver module.
Function Documentation
Decrement a variable value and check the resultant value.
This function prevents more than one thread from using pmplib_interlocked_increment() or pmplib_interlocked_decrement() function to access the same variable simultaneously.
- Parameters:
-
count The pointer to the variable whose value is to be decreased.
- Return values:
-
uint32_t The value of the variable after this decrement.
Increment a variable value and check the resultant value.
This function prevents more than one thread from using pmplib_interlocked_increment() or pmplib_interlocked_decrement() function to access the same variable simultaneously.
- Parameters:
-
count The pointer to the variable whose value is to be increased.
- Return values:
-
uint32_t The value of the variable after this increment.