OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [compat-uitron-memory-pool-mgmt-functions.html] - Diff between revs 28 and 174

Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>         Memory pool Management Functions</TITLE
>         Memory pool Management Functions</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="eCos Reference Manual"
TITLE="eCos Reference Manual"
HREF="ecos-ref.html"><LINK
HREF="ecos-ref.html"><LINK
REL="UP"
REL="UP"
TITLE="µITRON API"
TITLE="µITRON API"
HREF="compat-uitron-microitron-api.html"><LINK
HREF="compat-uitron-microitron-api.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="Interrupt management functions"
TITLE="Interrupt management functions"
HREF="compat-uitron-interrupt-management-functions.html"><LINK
HREF="compat-uitron-interrupt-management-functions.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="Time Management Functions"
TITLE="Time Management Functions"
HREF="compat-uitron-time-mgmt-functions.html"></HEAD
HREF="compat-uitron-time-mgmt-functions.html"></HEAD
><BODY
><BODY
CLASS="SECT1"
CLASS="SECT1"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>eCos Reference Manual</TH
>eCos Reference Manual</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="compat-uitron-interrupt-management-functions.html"
HREF="compat-uitron-interrupt-management-functions.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
>Chapter 32. &micro;ITRON API</TD
>Chapter 32. &micro;ITRON API</TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="compat-uitron-time-mgmt-functions.html"
HREF="compat-uitron-time-mgmt-functions.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><DIV
><DIV
CLASS="SECT1"
CLASS="SECT1"
><H1
><H1
CLASS="SECT1"
CLASS="SECT1"
><A
><A
NAME="COMPAT-UITRON-MEMORY-POOL-MGMT-FUNCTIONS">Memory pool Management Functions</H1
NAME="COMPAT-UITRON-MEMORY-POOL-MGMT-FUNCTIONS">Memory pool Management Functions</H1
><P
><P
>These functions are fully supported in this release: </P
>These functions are fully supported in this release: </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>get_blf</TT
>get_blf</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blf,</I
>p_blf,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid</I
>mpfid</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>pget_blf</TT
>pget_blf</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blf,</I
>p_blf,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid</I
>mpfid</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>tget_blf</TT
>tget_blf</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blf,</I
>p_blf,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid,</I
>mpfid,</I
></SPAN
></SPAN
>    TMO <SPAN
>    TMO <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>tmout</I
>tmout</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>rel_blf</TT
>rel_blf</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid,</I
>mpfid,</I
></SPAN
></SPAN
>    VP <SPAN
>    VP <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>blf</I
>blf</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>ref_mpf</TT
>ref_mpf</TT
>(
>(
    T_RMPF *<SPAN
    T_RMPF *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pk_rmpf,</I
>pk_rmpf,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid</I
>mpfid</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>get_blk</TT
>get_blk</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blk,</I
>p_blk,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid,</I
>mplid,</I
></SPAN
></SPAN
>    INT <SPAN
>    INT <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>blksz</I
>blksz</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>pget_blk</TT
>pget_blk</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blk,</I
>p_blk,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid,</I
>mplid,</I
></SPAN
></SPAN
>    INT <SPAN
>    INT <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>blksz</I
>blksz</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>tget_blk</TT
>tget_blk</TT
>(
>(
    VP *<SPAN
    VP *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>p_blk,</I
>p_blk,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid,</I
>mplid,</I
></SPAN
></SPAN
>    INT <SPAN
>    INT <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>blksz,</I
>blksz,</I
></SPAN
></SPAN
>    TMO <SPAN
>    TMO <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>tmout</I
>tmout</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>rel_blk</TT
>rel_blk</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid,</I
>mplid,</I
></SPAN
></SPAN
>    VP <SPAN
>    VP <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>blk</I
>blk</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>ref_mpl</TT
>ref_mpl</TT
>(
>(
    T_RMPL *<SPAN
    T_RMPL *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pk_rmpl,</I
>pk_rmpl,</I
></SPAN
></SPAN
>    ID <SPAN
>    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid )</I
>mplid )</I
></SPAN
></SPAN
></PRE
></PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>Note that of the memory provided for a particular pool to
>Note that of the memory provided for a particular pool to
manage in the static initialization of the memory pool objects,
manage in the static initialization of the memory pool objects,
some memory will be used to manage the pool itself. Therefore the
some memory will be used to manage the pool itself. Therefore the
number of blocks * the blocksize will be less than the total
number of blocks * the blocksize will be less than the total
memory size. </P
memory size. </P
><P
><P
>The following functions are supported in this release, when
>The following functions are supported in this release, when
enabled with
enabled with
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE</TT
>CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE</TT
>
>
or
or
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE</TT
>CYGPKG_UITRON_MEMPOOLFIXED_CREATE_DELETE</TT
>
>
as appropriate, with some restrictions: </P
as appropriate, with some restrictions: </P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpl</TT
>cre_mpl</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid,</I
>mplid,</I
></SPAN
></SPAN
>    T_CMPL *<SPAN
>    T_CMPL *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pk_cmpl</I
>pk_cmpl</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>del_mpl</TT
>del_mpl</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mplid</I
>mplid</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpf</TT
>cre_mpf</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid,</I
>mpfid,</I
></SPAN
></SPAN
>    T_CMPF *<SPAN
>    T_CMPF *<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>pk_cmpf</I
>pk_cmpf</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ER <TT
>ER <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>del_mpf</TT
>del_mpf</TT
>(
>(
    ID <SPAN
    ID <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>mpfid</I
>mpfid</I
></SPAN
></SPAN
> )</PRE
> )</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>Because of the static initialization facilities provided for
>Because of the static initialization facilities provided for
system objects, a memory pool is allocated a region of memory to
system objects, a memory pool is allocated a region of memory to
manage statically in the configuration. So while memory pools can
manage statically in the configuration. So while memory pools can
be created and deleted, the same area of memory is used for that
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
memory pool (memory pool ID number) each time. The requested variable pool
size (pk_cmpl-&gt;mplsz) or the number of fixed-size
size (pk_cmpl-&gt;mplsz) or the number of fixed-size
blocks (pk_cmpf-&gt;mpfcnt) times the block size
blocks (pk_cmpf-&gt;mpfcnt) times the block size
(pk_cmpf-&gt;blfsz) are checked for fitting within
(pk_cmpf-&gt;blfsz) are checked for fitting within
the statically allocated memory area, so if a create call succeeds,
the statically allocated memory area, so if a create call succeeds,
the resulting pool will be at least as large as that requested.
the resulting pool will be at least as large as that requested.
For this reason <TT
For this reason <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>del_mpl()</TT
>del_mpl()</TT
> and <TT
> and <TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>del_mpf()</TT
>del_mpf()</TT
> do
> do
not in any sense free the memory that was managed by the deleted
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
pool for use by other pools; it may only be managed by a pool of
the same object id. </P
the same object id. </P
><P
><P
>For both fixed and variable memory pools, the queueing order
>For both fixed and variable memory pools, the queueing order
when waiting on a synchronization object depends on the underlying
when waiting on a synchronization object depends on the underlying
kernel configuration. The multi-level queue scheduler is required
kernel configuration. The multi-level queue scheduler is required
for strict &micro;ITRON conformance and
for strict &micro;ITRON conformance and
it queues tasks in FIFO order, so requests to create an object with
it queues tasks in FIFO order, so requests to create an object with
priority queueing of tasks (pk_cxxx-&gt;xxxatr = TA_TPRI)
priority queueing of tasks (pk_cxxx-&gt;xxxatr = TA_TPRI)
are rejected with E_RSATR. Additional undefined bits in
are rejected with E_RSATR. Additional undefined bits in
the attributes fields must be zero. </P
the attributes fields must be zero. </P
><P
><P
>In general, extended information (pk_cxxx-&gt;exinf)
>In general, extended information (pk_cxxx-&gt;exinf)
is ignored. </P
is ignored. </P
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN13913">Error checking</H2
NAME="AEN13913">Error checking</H2
><P
><P
>The following conditions are only checked for, and only return
>The following conditions are only checked for, and only return
errors if
errors if
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
>CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
>
>
is enabled:</P
is enabled:</P
><P
><P
></P
></P
><UL
><UL
><LI
><LI
><P
><P
>invalid object id; less than 1 or greater than
>invalid object id; less than 1 or greater than
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGNUM_UITRON_MEMPOOLVAR/MEMPOOLFIXED</TT
>CYGNUM_UITRON_MEMPOOLVAR/MEMPOOLFIXED</TT
>
>
as appropriate returns E_ID</P
as appropriate returns E_ID</P
></LI
></LI
><LI
><LI
><P
><P
>dispatching is enabled in any call which can sleep, or
>dispatching is enabled in any call which can sleep, or
E_CTX</P
E_CTX</P
></LI
></LI
><LI
><LI
><P
><P
>tmout must be positive, otherwise E_PAR</P
>tmout must be positive, otherwise E_PAR</P
></LI
></LI
><LI
><LI
><P
><P
>pk_cxxx pointers in
>pk_cxxx pointers in
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_xxx()</TT
>cre_xxx()</TT
>
>
 must be valid pointers, or E_PAR</P
 must be valid pointers, or E_PAR</P
></LI
></LI
><LI
><LI
><P
><P
>return value pointer in
>return value pointer in
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>ref_xxx()</TT
>ref_xxx()</TT
>
>
 is a valid pointer, or E_PAR</P
 is a valid pointer, or E_PAR</P
></LI
></LI
><LI
><LI
><P
><P
>return value pointers in get block routines is a valid
>return value pointers in get block routines is a valid
pointer, or E_PAR</P
pointer, or E_PAR</P
></LI
></LI
><LI
><LI
><P
><P
>blocksize request in get variable block routines is greater
>blocksize request in get variable block routines is greater
than zero, or E_PAR</P
than zero, or E_PAR</P
></LI
></LI
></UL
></UL
><P
><P
>The following conditions are checked for, and can return error
>The following conditions are checked for, and can return error
codes, regardless of the setting of
codes, regardless of the setting of
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
>CYGSEM_UITRON_BAD_PARAMS_RETURN_ERRORS</TT
>:</P
>:</P
><P
><P
></P
></P
><UL
><UL
><LI
><LI
><P
><P
>When create and delete functions
>When create and delete functions
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_xxx()</TT
>cre_xxx()</TT
>
>
 and
 and
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>del_xxx()</TT
>del_xxx()</TT
>
>
 are supported, all calls which use a valid object ID number check
 are supported, all calls which use a valid object ID number check
that the object exists. If not, E_NOEXS is returned.</P
that the object exists. If not, E_NOEXS is returned.</P
></LI
></LI
><LI
><LI
><P
><P
>When create functions
>When create functions
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_xxx()</TT
>cre_xxx()</TT
>
>
 are supported, if the object already exists, then E_OBJ</P
 are supported, if the object already exists, then E_OBJ</P
></LI
></LI
><LI
><LI
><P
><P
>In any call which can sleep, such as
>In any call which can sleep, such as
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>get_blk()</TT
>get_blk()</TT
>
>
: return codes E_TMOUT, E_RLWAI, E_DLT
: return codes E_TMOUT, E_RLWAI, E_DLT
or of course E_OK are returned depending on the reason
or of course E_OK are returned depending on the reason
for terminating the sleep</P
for terminating the sleep</P
></LI
></LI
><LI
><LI
><P
><P
>In polling functions such as
>In polling functions such as
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>pget_blk()</TT
>pget_blk()</TT
>
>
return codes E_TMOUT or E_OK are returned depending
return codes E_TMOUT or E_OK are returned depending
on the state of the synchronization object</P
on the state of the synchronization object</P
></LI
></LI
><LI
><LI
><P
><P
>In creation functions, the attributes must be compatible
>In creation functions, the attributes must be compatible
with the selected underlying kernel configuration: in
with the selected underlying kernel configuration: in
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpl()</TT
>cre_mpl()</TT
>
>
 
 
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>pk_cmpl-&gt;mplatr</TT
>pk_cmpl-&gt;mplatr</TT
>
>
 must be equal to
 must be equal to
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>TA_TFIFO</TT
>TA_TFIFO</TT
>
>
 else E_RSATR.</P
 else E_RSATR.</P
></LI
></LI
><LI
><LI
><P
><P
>In
>In
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpf()</TT
>cre_mpf()</TT
>
>
 
 
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>pk_cmpf-&gt;mpfatr</TT
>pk_cmpf-&gt;mpfatr</TT
>
>
 must be equal to
 must be equal to
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>TA_TFIFO</TT
>TA_TFIFO</TT
>
>
 else E_RSATR.</P
 else E_RSATR.</P
></LI
></LI
><LI
><LI
><P
><P
>In creation functions, the requested size of the memory
>In creation functions, the requested size of the memory
pool must not be larger than that statically configured for the
pool must not be larger than that statically configured for the
pool else E_RSATR; see the configuration option
pool else E_RSATR; see the configuration option
&#8220;Option: Static initializers&#8221;.
&#8220;Option: Static initializers&#8221;.
 In
 In
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpl()</TT
>cre_mpl()</TT
>
>
 
 
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>pk_cmpl-&gt;mplsz</TT
>pk_cmpl-&gt;mplsz</TT
>
>
 is the field of interest</P
 is the field of interest</P
></LI
></LI
><LI
><LI
><P
><P
>In
>In
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>cre_mpf()</TT
>cre_mpf()</TT
>
>
 the product of
 the product of
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>pk_cmpf-&gt;blfsz</TT
>pk_cmpf-&gt;blfsz</TT
>
>
 and
 and
<TT
<TT
CLASS="LITERAL"
CLASS="LITERAL"
>pk_cmpf-&gt;mpfcnt</TT
>pk_cmpf-&gt;mpfcnt</TT
>
>
 must be smaller than the memory statically configured for the pool
 must be smaller than the memory statically configured for the pool
else E_RSATR</P
else E_RSATR</P
></LI
></LI
><LI
><LI
><P
><P
>In functions which return memory to the pool
>In functions which return memory to the pool
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>rel_blk()</TT
>rel_blk()</TT
>
>
 and
 and
<TT
<TT
CLASS="FUNCTION"
CLASS="FUNCTION"
>rel_blf()</TT
>rel_blf()</TT
>
>
, if the free fails, for example because the memory did not come
, if the free fails, for example because the memory did not come
from that pool originally, then E_PAR is returned</P
from that pool originally, then E_PAR is returned</P
></LI
></LI
></UL
></UL
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="compat-uitron-interrupt-management-functions.html"
HREF="compat-uitron-interrupt-management-functions.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ecos-ref.html"
HREF="ecos-ref.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="compat-uitron-time-mgmt-functions.html"
HREF="compat-uitron-time-mgmt-functions.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>Interrupt management functions</TD
>Interrupt management functions</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="compat-uitron-microitron-api.html"
HREF="compat-uitron-microitron-api.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>Time Management Functions</TD
>Time Management Functions</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.