Skip to content

Commit ac3dcc1

Browse files
Andrew Boienashif
authored andcommitted
doc: clarify k_queue_alloc_append and related APIs
The data isn't copied, there's just an additional implicit allocation. Fixes: #15090 Signed-off-by: Andrew Boie <[email protected]>
1 parent 3854f23 commit ac3dcc1

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

include/kernel.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,9 +1812,10 @@ extern void k_queue_append(struct k_queue *queue, void *data);
18121812
/**
18131813
* @brief Append an element to a queue.
18141814
*
1815-
* This routine appends a data item to @a queue. There is an implicit
1816-
* memory allocation from the calling thread's resource pool, which is
1817-
* automatically freed when the item is removed from the queue.
1815+
* This routine appends a data item to @a queue. There is an implicit memory
1816+
* allocation to create an additional temporary bookkeeping data structure from
1817+
* the calling thread's resource pool, which is automatically freed when the
1818+
* item is removed. The data itself is not copied.
18181819
*
18191820
* @note Can be called by ISRs.
18201821
*
@@ -1845,9 +1846,10 @@ extern void k_queue_prepend(struct k_queue *queue, void *data);
18451846
/**
18461847
* @brief Prepend an element to a queue.
18471848
*
1848-
* This routine prepends a data item to @a queue. There is an implicit
1849-
* memory allocation from the calling thread's resource pool, which is
1850-
* automatically freed when the item is removed from the queue.
1849+
* This routine prepends a data item to @a queue. There is an implicit memory
1850+
* allocation to create an additional temporary bookkeeping data structure from
1851+
* the calling thread's resource pool, which is automatically freed when the
1852+
* item is removed. The data itself is not copied.
18511853
*
18521854
* @note Can be called by ISRs.
18531855
*
@@ -2117,9 +2119,10 @@ struct k_fifo {
21172119
/**
21182120
* @brief Add an element to a FIFO queue.
21192121
*
2120-
* This routine adds a data item to @a fifo. There is an implicit
2121-
* memory allocation from the calling thread's resource pool, which is
2122-
* automatically freed when the item is removed.
2122+
* This routine adds a data item to @a fifo. There is an implicit memory
2123+
* allocation to create an additional temporary bookkeeping data structure from
2124+
* the calling thread's resource pool, which is automatically freed when the
2125+
* item is removed. The data itself is not copied.
21232126
*
21242127
* @note Can be called by ISRs.
21252128
*
@@ -2316,9 +2319,10 @@ struct k_lifo {
23162319
/**
23172320
* @brief Add an element to a LIFO queue.
23182321
*
2319-
* This routine adds a data item to @a lifo. There is an implicit
2320-
* memory allocation from the calling thread's resource pool, which is
2321-
* automatically freed when the item is removed.
2322+
* This routine adds a data item to @a lifo. There is an implicit memory
2323+
* allocation to create an additional temporary bookkeeping data structure from
2324+
* the calling thread's resource pool, which is automatically freed when the
2325+
* item is removed. The data itself is not copied.
23222326
*
23232327
* @note Can be called by ISRs.
23242328
*

0 commit comments

Comments
 (0)