diff --git a/doc/kernel/microkernel/microkernel_memory_pools.rst b/doc/kernel/microkernel/microkernel_memory_pools.rst index 80e15bdb657..5cc6716ed68 100644 --- a/doc/kernel/microkernel/microkernel_memory_pools.rst +++ b/doc/kernel/microkernel/microkernel_memory_pools.rst @@ -134,15 +134,15 @@ This code waits up to 5 ticks for an 80 byte memory block to become available and gives a warning if a suitable memory block is not obtained in that time. -.. code-block:: c +.. code-block:: none - struct k_block block; + struct k_block block; - if (task_mem_pool_alloc(&block, MYPOOL, 80, 5) == RC_OK) { - /* use memory block */ - } else { - printf('Memory allocation timeout'); - } + if (task_mem_pool_alloc(:&block, MYPOOL, 80, 5) == RC_OK) { + /* use memory block */ + } else { + printf('Memory allocation timeout'); + } Example: Requesting a Memory Block from a Pool with a No-Blocking Condition =========================================================================== @@ -150,15 +150,15 @@ Example: Requesting a Memory Block from a Pool with a No-Blocking Condition This code gives an immediate warning when it can not satisfy the request for a memory block of 80 bytes. -.. code-block:: c +.. code-block:: none - struct k_block block; + struct k_block block; - if (task_mem_pool_alloc (&block, MYPOOL, 80, TICKS_NONE) == RC_OK) { - /* use memory block */ - } else { - printf('Memory allocation timeout'); - } + if (task_mem_pool_alloc (&block, MYPOOL, 80, TICKS_NONE) == RC_OK) { + /* use memory block */ + } else { + printf('Memory allocation timeout'); + } Example: Freeing a Memory Block Back to a Pool ============================================== diff --git a/doc/reference/kbuild/kbuild_makefiles.rst b/doc/reference/kbuild/kbuild_makefiles.rst index 0cf3dff4b55..c3169f26874 100644 --- a/doc/reference/kbuild/kbuild_makefiles.rst +++ b/doc/reference/kbuild/kbuild_makefiles.rst @@ -63,7 +63,7 @@ example, if the option :option:`CONFIG_VAR` is set and it implies that a source file must be added in the compilation process, then the following line adds the source code conditionally: -.. code-block:: make +.. code-block:: none obj-$(CONFIG_VAR) += .o @@ -88,9 +88,9 @@ an additional lever of recursion. Directories can also be conditionally added: -.. code-block:: make +.. code-block:: none - oby-$(CONFIG_VAR) += / + obj-y-$(CONFIG_VAR) += / The subdirectory must contain its own Makefile following the rules described in :ref:`makefile_conventions`.