These functions are fully supported in this release:
Note that of the memory provided for a particular pool to manage in the static initialization of the memory pool objects, some memory will be used to manage the pool itself. Therefore the number of blocks * the blocksize will be less than the total memory size.
The following functions are supported in this release, when enabled with CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE or CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE as appropriate, with some restrictions:
Because of the static initialization facilities provided for
system objects, a memory pool is allocated a region of memory to
manage statically in the configuration. So while memory pools can
be created and deleted, the same area of memory is used for that
memory pool (memory pool ID number) each time. The requested variable pool
size (pk_cmpl->mplsz) or the number of fixed-size
blocks (pk_cmpf->mpfcnt) times the block size
(pk_cmpf->blfsz) are checked for fitting within
the statically allocated memory area, so if a create call succeeds,
the resulting pool will be at least as large as that requested.
For this reason
not in any sense free the memory that was managed by the deleted
pool for use by other pools; it may only be managed by a pool of
the same object id.
For both fixed and variable memory pools, the queueing order when waiting on a synchronization object depends on the underlying kernel configuration. The multi-level queue scheduler is required for strict µITRON conformance and it queues tasks in FIFO order, so requests to create an object with priority queueing of tasks (pk_cxxx->xxxatr = TA_TPRI) are rejected with E_RSATR. Additional undefined bits in the attributes fields must be zero.
In general, extended information (pk_cxxx->exinf) is ignored.
The following conditions are only checked for, and only return errors if CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS is enabled:
invalid object id; less than 1 or greater than CYGNUM_UITRON_MEMPOOLVAR/MEMPOOLFIXED as appropriate returns E_ID
dispatching is enabled in any call which can sleep, or E_CTX
tmout must be positive, otherwise E_PAR
pk_cxxx pointers in
must be valid pointers, or E_PAR
return value pointer in
is a valid pointer, or E_PAR
return value pointers in get block routines is a valid pointer, or E_PAR
blocksize request in get variable block routines is greater than zero, or E_PAR
The following conditions are checked for, and can return error codes, regardless of the setting of CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS:
When create and delete functions
are supported, all calls which use a valid object ID number check
that the object exists. If not, E_NOEXS is returned.
When create functions
are supported, if the object already exists, then E_OBJ
In any call which can sleep, such as
: return codes E_TMOUT, E_RLWAI, E_DLT
or of course E_OK are returned depending on the reason
for terminating the sleep
In polling functions such as
return codes E_TMOUT or E_OK are returned depending
on the state of the synchronization object
In creation functions, the attributes must be compatible
with the selected underlying kernel configuration: in
must be equal to
must be equal to
In creation functions, the requested size of the memory
pool must not be larger than that statically configured for the
pool else E_RSATR; see the configuration option
“Option: Static initializers”.
is the field of interest
the product of
must be smaller than the memory statically configured for the pool
In functions which return memory to the pool
, if the free fails, for example because the memory did not come
from that pool originally, then E_PAR is returned