diff --git a/doc/kernel_v2/data_passing/fifos.rst b/doc/kernel_v2/data_passing/fifos.rst index 7c98cdcc8d07f8..b06629bdbaf7e0 100644 --- a/doc/kernel_v2/data_passing/fifos.rst +++ b/doc/kernel_v2/data_passing/fifos.rst @@ -71,7 +71,7 @@ The following code defines and initializes an empty fifo. k_fifo_init(&my_fifo); Alternatively, an empty fifo can be defined and initialized at compile time -by calling :c:macro:`K_FIFO_DEFINE()`. +by calling :c:macro:`K_FIFO_DEFINE`. The following code has the same effect as the code segment above. @@ -153,6 +153,7 @@ APIs The following fifo APIs are provided by :file:`kernel.h`: +* :c:macro:`K_FIFO_DEFINE` * :cpp:func:`k_fifo_init()` * :cpp:func:`k_fifo_put()` * :cpp:func:`k_fifo_put_list()` diff --git a/doc/kernel_v2/data_passing/lifos.rst b/doc/kernel_v2/data_passing/lifos.rst index 4311866c8fc977..15dc533b99a6ee 100644 --- a/doc/kernel_v2/data_passing/lifos.rst +++ b/doc/kernel_v2/data_passing/lifos.rst @@ -62,7 +62,7 @@ The following defines and initializes an empty lifo. k_lifo_init(&my_lifo); Alternatively, an empty lifo can be defined and initialized at compile time -by calling :c:macro:`K_LIFO_DEFINE()`. +by calling :c:macro:`K_LIFO_DEFINE`. The following code has the same effect as the code segment above. @@ -141,6 +141,7 @@ APIs The following lifo APIs are provided by :file:`kernel.h`: +* :c:macro:`K_LIFO_DEFINE` * :cpp:func:`k_lifo_init()` * :cpp:func:`k_lifo_put()` * :cpp:func:`k_lifo_get()` diff --git a/doc/kernel_v2/data_passing/mailboxes.rst b/doc/kernel_v2/data_passing/mailboxes.rst index 445f086f9c20b4..9af3f5089a846d 100644 --- a/doc/kernel_v2/data_passing/mailboxes.rst +++ b/doc/kernel_v2/data_passing/mailboxes.rst @@ -130,7 +130,7 @@ The following code defines and initializes an empty mailbox. k_mbox_init(&my_mailbox); Alternatively, a mailbox can be defined and initialized at compile time -by calling :c:macro:`K_MBOX_DEFINE()`. +by calling :c:macro:`K_MBOX_DEFINE`. The following code has the same effect as the code segment above. @@ -634,6 +634,8 @@ APIs The following APIs for a mailbox are provided by :file:`kernel.h`: +* :c:macro:`K_MBOX_DEFINE` +* :cpp:func:`k_mbox_init()` * :cpp:func:`k_mbox_put()` * :cpp:func:`k_mbox_async_put()` * :cpp:func:`k_mbox_get()` diff --git a/doc/kernel_v2/data_passing/message_queues.rst b/doc/kernel_v2/data_passing/message_queues.rst index 2d460d7feb2dc0..e23c3a2fbbd8dd 100644 --- a/doc/kernel_v2/data_passing/message_queues.rst +++ b/doc/kernel_v2/data_passing/message_queues.rst @@ -85,7 +85,7 @@ that is capable of holding 10 items, each of which is 12 bytes long. k_msgq_init(&my_msgq, my_msgq_buffer, sizeof(data_item_type), 10); Alternatively, a message queue can be defined and initialized at compile time -by calling :c:macro:`K_MSGQ_DEFINE()`. +by calling :c:macro:`K_MSGQ_DEFINE`. The following code has the same effect as the code segment above. Observe that the macro defines both the message queue and its buffer. @@ -176,6 +176,7 @@ APIs The following message queue APIs are provided by :file:`kernel.h`: +* :c:macro:`K_MSGQ_DEFINE` * :cpp:func:`k_msgq_init()` * :cpp:func:`k_msgq_put()` * :cpp:func:`k_msgq_get()` diff --git a/doc/kernel_v2/data_passing/pipes.rst b/doc/kernel_v2/data_passing/pipes.rst index c5715b472dccc4..c870d61c08b85d 100644 --- a/doc/kernel_v2/data_passing/pipes.rst +++ b/doc/kernel_v2/data_passing/pipes.rst @@ -68,7 +68,7 @@ buffer capable of holding 100 bytes and is aligned to a 4-byte boundary. k_pipe_init(&my_pipe, my_ring_buffer, sizeof(my_ring_buffer)); Alternatively, a pipe can be defined and initialized at compile time by -calling :c:macro:`K_PIPE_DEFINE()`. +calling :c:macro:`K_PIPE_DEFINE`. The following code has the same effect as the code segment above. Observe that that macro defines both the pipe and its ring buffer. @@ -179,6 +179,7 @@ APIs The following message queue APIs are provided by :file:`kernel.h`: +* :c:macro:`K_PIPE_DEFINE` * :cpp:func:`k_pipe_init()` * :cpp:func:`k_pipe_put()` * :cpp:func:`k_pipe_get()` diff --git a/doc/kernel_v2/data_passing/stacks.rst b/doc/kernel_v2/data_passing/stacks.rst index 8dcaeab472874e..b6b77924641723 100644 --- a/doc/kernel_v2/data_passing/stacks.rst +++ b/doc/kernel_v2/data_passing/stacks.rst @@ -69,7 +69,7 @@ up to ten 32-bit data values. k_stack_init(&my_stack, my_stack_array, MAX_ITEMS); Alternatively, a stack can be defined and initialized at compile time -by calling :c:macro:`K_STACK_DEFINE()`. +by calling :c:macro:`K_STACK_DEFINE`. The following code has the same effect as the code segment above. Observe that the macro defines both the stack and its array of data values. @@ -136,6 +136,7 @@ APIs The following stack APIs are provided by :file:`kernel.h`: +* :c:macro:`K_STACK_DEFINE` * :cpp:func:`k_stack_init()` * :cpp:func:`k_stack_push()` * :cpp:func:`k_stack_pop()` diff --git a/doc/kernel_v2/memory/pools.rst b/doc/kernel_v2/memory/pools.rst index 821a62afb6fc99..2f8b18fb604333 100644 --- a/doc/kernel_v2/memory/pools.rst +++ b/doc/kernel_v2/memory/pools.rst @@ -122,7 +122,7 @@ However, since a memory pool also requires a number of variable-size data structures to represent its block sets and the status of its quad-blocks, the kernel does not support the run-time definition of a memory pool. A memory pool can only be defined and initialized at compile time -by calling :c:macro:`K_MEM_POOL_DEFINE()`. +by calling :c:macro:`K_MEM_POOL_DEFINE`. The following code defines and initializes a memory pool that has 3 blocks of 4096 bytes each, which can be partitioned into blocks as small as 64 bytes @@ -212,6 +212,7 @@ APIs The following memory pool APIs are provided by :file:`kernel.h`: +* :c:macro:`K_MEM_POOL_DEFINE` * :cpp:func:`k_mem_pool_alloc()` * :cpp:func:`k_mem_pool_free()` * :cpp:func:`k_mem_pool_defrag()` diff --git a/doc/kernel_v2/memory/slabs.rst b/doc/kernel_v2/memory/slabs.rst index b11b0ee139ec6f..4a503d2cfe1550 100644 --- a/doc/kernel_v2/memory/slabs.rst +++ b/doc/kernel_v2/memory/slabs.rst @@ -81,7 +81,7 @@ that are 400 bytes long, each of which is aligned to a 4-byte boundary.. k_mem_slab_init(&my_slab, my_slab_buffer, 400, 6); Alternatively, a memory slab can be defined and initialized at compile time -by calling :c:macro:`K_MEM_SLAB_DEFINE()`. +by calling :c:macro:`K_MEM_SLAB_DEFINE`. The following code has the same effect as the code segment above. Observe that the macro defines both the memory slab and its buffer. @@ -146,6 +146,7 @@ APIs The following memory slab APIs are provided by :file:`kernel.h`: +* :c:macro:`K_MEM_SLAB_DEFINE` * :cpp:func:`k_mem_slab_init()` * :cpp:func:`k_mem_slab_alloc()` * :cpp:func:`k_mem_slab_free()` diff --git a/doc/kernel_v2/other/atomic.rst b/doc/kernel_v2/other/atomic.rst index 413b8737022a67..22b8bd0870e9e5 100644 --- a/doc/kernel_v2/other/atomic.rst +++ b/doc/kernel_v2/other/atomic.rst @@ -31,7 +31,7 @@ Defining an Atomic Variable An atomic variable is defined using a variable of type :c:type:`atomic_t`. By default an atomic variable is initialized to zero. However, it can be given -a different value using :c:macro:`ATOMIC_INIT()`: +a different value using :c:macro:`ATOMIC_INIT`: .. code-block:: c @@ -67,7 +67,7 @@ Manipulating an Array of Atomic Variables An array of 32-bit atomic variables can be defined in the conventional manner. However, you can also define an N-bit array of atomic variables using -:c:macro:`ATOMIC_DEFINE()`. +:c:macro:`ATOMIC_DEFINE`. A single bit in array of atomic variables can be manipulated using the APIs listed at the end of this section that end with :cpp:func:`_bit`. @@ -115,8 +115,8 @@ APIs The following atomic operation APIs are provided by :file:`atomic.h`: -* :c:macro:`ATOMIC_INIT()` -* :c:macro:`ATOMIC_DEFINE()` +* :c:macro:`ATOMIC_INIT` +* :c:macro:`ATOMIC_DEFINE` * :cpp:func:`atomic_get()` * :cpp:func:`atomic_set()` * :cpp:func:`atomic_clear()` diff --git a/doc/kernel_v2/other/float.rst b/doc/kernel_v2/other/float.rst index 1f1f7f18231512..cc6bc744e2ca22 100644 --- a/doc/kernel_v2/other/float.rst +++ b/doc/kernel_v2/other/float.rst @@ -102,7 +102,7 @@ pre-tag a thread using one of the techniques listed below. * A statically-spawned x86 thread can be pre-tagged by passing the :c:macro:`K_FP_REGS` or :c:macro:`K_SSE_REGS` option to - :c:macro:`K_THREAD_DEFINE()`. + :c:macro:`K_THREAD_DEFINE`. * A dynamically-spawned x86 thread can be pre-tagged by passing the :c:macro:`K_FP_REGS` or :c:macro:`K_SSE_REGS` option to diff --git a/doc/kernel_v2/other/interrupts.rst b/doc/kernel_v2/other/interrupts.rst index 429e87e8372913..c3fca31f26cb71 100644 --- a/doc/kernel_v2/other/interrupts.rst +++ b/doc/kernel_v2/other/interrupts.rst @@ -127,7 +127,7 @@ Implementation Defining an ISR =============== -An ISR is defined at run-time by calling :c:macro:`IRQ_CONNECT()`. It must +An ISR is defined at run-time by calling :c:macro:`IRQ_CONNECT`. It must then be enabled by calling :cpp:func:`irq_enable()`. .. important:: @@ -185,7 +185,7 @@ APIs The following interrupt-related APIs are provided by :file:`irq.h`: -* :c:macro:`IRQ_CONNECT()` +* :c:macro:`IRQ_CONNECT` * :cpp:func:`irq_lock()` * :cpp:func:`irq_unlock()` * :cpp:func:`irq_enable()` diff --git a/doc/kernel_v2/synchronization/alerts.rst b/doc/kernel_v2/synchronization/alerts.rst index 686722f193be4a..695585df569324 100644 --- a/doc/kernel_v2/synchronization/alerts.rst +++ b/doc/kernel_v2/synchronization/alerts.rst @@ -103,7 +103,7 @@ new pending alerts. k_alert_init(&my_alert, my_alert_handler, 10); Alternatively, an alert can be defined and initialized at compile time -by calling :c:macro:`K_ALERT_DEFINE()`. +by calling :c:macro:`K_ALERT_DEFINE`. The following code has the same effect as the code segment above. @@ -234,6 +234,7 @@ APIs The following alert APIs are provided by :file:`kernel.h`: +* :c:macro:`K_ALERT_DEFINE` * :cpp:func:`k_alert_init()` * :cpp:func:`k_alert_send()` * :cpp:func:`k_alert_recv()` diff --git a/doc/kernel_v2/synchronization/mutexes.rst b/doc/kernel_v2/synchronization/mutexes.rst index ba1eff2d79431d..ec7f9bb05243be 100644 --- a/doc/kernel_v2/synchronization/mutexes.rst +++ b/doc/kernel_v2/synchronization/mutexes.rst @@ -105,7 +105,7 @@ The following code defines and initializes a mutex. k_mutex_init(&my_mutex); Alternatively, a mutex can be defined and initialized at compile time -by calling :c:macro:`K_MUTEX_DEFINE()`. +by calling :c:macro:`K_MUTEX_DEFINE`. The following code has the same effect as the code segment above. @@ -166,6 +166,7 @@ APIs The following mutex APIs are provided by :file:`kernel.h`: +* :c:macro:`K_MUTEX_DEFINE` * :cpp:func:`k_mutex_init()` * :cpp:func:`k_mutex_lock()` * :cpp:func:`k_mutex_unlock()` diff --git a/doc/kernel_v2/synchronization/semaphores.rst b/doc/kernel_v2/synchronization/semaphores.rst index 49d3379006a0e1..ed90026c940d22 100644 --- a/doc/kernel_v2/synchronization/semaphores.rst +++ b/doc/kernel_v2/synchronization/semaphores.rst @@ -60,7 +60,7 @@ semaphore by setting its count to 0 and its limit to 1. k_sem_init(&my_sem, 0, 1); Alternatively, a semaphore can be defined and initialized at compile time -by calling :c:macro:`K_SEM_DEFINE()`. +by calling :c:macro:`K_SEM_DEFINE`. The following code has the same effect as the code segment above. @@ -130,6 +130,7 @@ APIs The following semaphore APIs are provided by :file:`kernel.h`: +* :c:macro:`K_SEM_DEFINE` * :cpp:func:`k_sem_init()` * :cpp:func:`k_sem_give()` * :cpp:func:`k_sem_take()` diff --git a/doc/kernel_v2/threads/lifecycle.rst b/doc/kernel_v2/threads/lifecycle.rst index 0bb13a049e3494..6e76e267c53358 100644 --- a/doc/kernel_v2/threads/lifecycle.rst +++ b/doc/kernel_v2/threads/lifecycle.rst @@ -169,7 +169,7 @@ The following code spawns a thread that starts immediately. MY_PRIORITY, 0, K_NO_WAIT); Alternatively, a thread can be spawned at compile time by calling -:c:macro:`K_THREAD_DEFINE()`. Observe that the macro defines +:c:macro:`K_THREAD_DEFINE`. Observe that the macro defines the stack area and thread id variables automatically. The following code has the same effect as the code segment above. @@ -228,6 +228,7 @@ APIs The following thread APIs are provided by :file:`kernel.h`: +* :c:macro:`K_THREAD_DEFINE` * :cpp:func:`k_thread_spawn()` * :cpp:func:`k_thread_cancel()` * :cpp:func:`k_thread_abort()` diff --git a/doc/kernel_v2/timing/timers.rst b/doc/kernel_v2/timing/timers.rst index 9c6791cfc7e358..d226e85bb85a84 100644 --- a/doc/kernel_v2/timing/timers.rst +++ b/doc/kernel_v2/timing/timers.rst @@ -112,7 +112,7 @@ The following code defines and initializes a timer. k_timer_init(&my_timer, my_expiry_function, NULL); Alternatively, a timer can be defined and initialized at compile time -by calling :c:macro:`K_TIMER_DEFINE()`. +by calling :c:macro:`K_TIMER_DEFINE`. The following code has the same effect as the code segment above. @@ -241,6 +241,7 @@ APIs The following timer APIs are provided by :file:`kernel.h`: +* :c:macro:`K_TIMER_DEFINE` * :cpp:func:`k_timer_init()` * :cpp:func:`k_timer_start()` * :cpp:func:`k_timer_stop()`