|
QP/C
|
QMPool_get() and QF_getPoolMargin() implementation. More...
Go to the source code of this file.
Functions | |
| void * | QMPool_get (QMPool *me) |
| Obtains a memory block from a memory pool. | |
| uint32_t | QF_getPoolMargin (uint8_t poolId) |
| This function returns the margin of the given event pool. | |
QMPool_get() and QF_getPoolMargin() implementation.
Definition in file qmp_get.c.
| uint32_t QF_getPoolMargin | ( | uint8_t | poolId | ) |
This function returns the margin of the given event pool.
This function returns the margin of the given event pool poolId, where poolId is the ID of the pool initialized by the call to QF_poolInit(). The poolId of the first initialized pool is 1, the second 2, and so on.
The returned pool margin is the minimal number of free blocks encountered in the given pool since system startup.
Definition at line 65 of file qmp_get.c.
References Q_REQUIRE, QF_maxPool_, and QF_pool_.
| void* QMPool_get | ( | QMPool * | me | ) |
Obtains a memory block from a memory pool.
The only parameter me is a pointer to the QMPool from which the block is requested. The function returns a pointer to the allocated memory block or NULL if no free blocks are available.
A allocated block must be returned to the same pool from which it has been allocated.
This function can be called from any task level or ISR level.
Definition at line 40 of file qmp_get.c.
References QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_mpObj_, QS_OBJ_, QS_QF_MPOOL_GET, and QS_TIME_.
1.7.6.1