doc: Change API tables to lists in the Kernel Primer.

The tables in the Kernel Primer are changed to lists. Making it easier
to update them. Other minor changes were done to ensure consitency.
The :c: and :cpp: markup has been fixed. When the documentation for a
call exists, then it is linked.

Change-Id: I8f389a0a0ca7c5fe904c0a1fa520e2e499f1001b
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
This commit is contained in:
Rodrigo Caballero 2015-10-07 15:55:39 -05:00 committed by Anas Nashif
commit c1c1ffe7f7
22 changed files with 570 additions and 734 deletions

View file

@ -58,7 +58,6 @@ needed. For example, different applications can utilize
different memory pools so that one application does not
allocate all of the available blocks.
Purpose
*******
Use memory pools to allocate memory in variable-size blocks.
@ -66,7 +65,6 @@ Use memory pools to allocate memory in variable-size blocks.
Use memory pool blocks when sending data to a mailbox
asynchronously.
Usage
*****
@ -91,7 +89,6 @@ The following parameters must be defined:
This specifies the number of maximum size memory blocks
available at startup.
Public Memory Pool
------------------
@ -118,7 +115,6 @@ includes the file :file:`zephyr.h`.
.. note::
Private memory pools are not supported by the Zephyr kernel.
Example: Requesting a Memory Block from a Pool with No Conditions
=================================================================
@ -133,7 +129,6 @@ available, then fills it with zeroes.
memset(block.pointer_to_data, 0, 80);
Example: Requesting a Memory Block from a Pool with a Conditional Time-out
==========================================================================
@ -151,7 +146,6 @@ in that time.
printf('Memory allocation timeout');
}
Example: Requesting a Memory Block from a Pool with a No Blocking Condition
===========================================================================
@ -168,7 +162,6 @@ a memory block of 80 bytes.
printf('Memory allocation timeout');
}
Example: Freeing a Memory Block Back to a Pool
==============================================
@ -182,7 +175,6 @@ This code releases a memory block back to a pool when it is no longer needed.
/* use memory block */
task_mem_pool_free(&block);
Example: Manually Defragmenting a Memory Pool
=============================================
@ -199,23 +191,20 @@ each time a memory block allocation occurs.
APIs
****
The following Memory Pools APIs are provided by microkernel.h.
The following Memory Pools APIs are provided by :file:`microkernel.h`:
+----------------------------------------------+------------------------------+
| Call | Description |
+==============================================+==============================+
| :c:func:`task_mem_pool_alloc()` | Allocates a block from |
| | a memory pool. |
+----------------------------------------------+------------------------------+
| :c:func:`task_mem_pool_alloc_wait()` | Waits for a block of memory |
| | until it is available. |
+----------------------------------------------+------------------------------+
| :c:func:`task_mem_pool_alloc_wait_timeout()` | Waits for a block of memory |
| | for the time period defined |
| | by the time-out parameter. |
+----------------------------------------------+------------------------------+
| :c:func:`task_mem_pool_free()` | Returns a block of memory |
| | to a memory pool. |
+----------------------------------------------+------------------------------+
| :c:func:`task_mem_pool_defragment()` | Defragments a memory pool. |
+----------------------------------------------+------------------------------+
:c:func:`task_mem_pool_alloc()`
Allocates a block from a memory pool.
:c:func:`task_mem_pool_alloc_wait()`
Waits for a block of memory until it is available.
:c:func:`task_mem_pool_alloc_wait_timeout()`
Waits for a block of memory for the time period defined by the time-out
parameter.
:c:func:`task_mem_pool_free()`
Returns a block of memory to a memory pool.
:c:func:`task_mem_pool_defragment()`
Defragments a memory pool.