Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 868) sorted by relevance

12345678910>>...35

/Zephyr-latest/kernel/
Dstack.c27 void k_stack_init(struct k_stack *stack, stack_data_t *buffer, in k_stack_init() argument
30 z_waitq_init(&stack->wait_q); in k_stack_init()
31 stack->lock = (struct k_spinlock) {}; in k_stack_init()
32 stack->next = buffer; in k_stack_init()
33 stack->base = buffer; in k_stack_init()
34 stack->top = stack->base + num_entries; in k_stack_init()
36 SYS_PORT_TRACING_OBJ_INIT(k_stack, stack); in k_stack_init()
37 k_object_init(stack); in k_stack_init()
40 k_obj_core_init_and_link(K_OBJ_CORE(stack), &obj_type_stack); in k_stack_init()
44 int32_t z_impl_k_stack_alloc_init(struct k_stack *stack, uint32_t num_entries) in z_impl_k_stack_alloc_init() argument
[all …]
Ddynamic.c27 k_thread_stack_t *stack; member
38 k_thread_stack_t *stack; in z_thread_stack_alloc_pool() local
54 stack = (k_thread_stack_t *)&dynamic_stack[offset]; in z_thread_stack_alloc_pool()
56 return stack; in z_thread_stack_alloc_pool()
77 k_thread_stack_t *stack = NULL; in z_impl_k_thread_stack_alloc() local
80 stack = z_thread_stack_alloc_dyn(size, flags); in z_impl_k_thread_stack_alloc()
81 if (stack == NULL && CONFIG_DYNAMIC_THREAD_POOL_SIZE > 0) { in z_impl_k_thread_stack_alloc()
82 stack = z_thread_stack_alloc_pool(size); in z_impl_k_thread_stack_alloc()
86 stack = z_thread_stack_alloc_pool(size); in z_impl_k_thread_stack_alloc()
89 if ((stack == NULL) && IS_ENABLED(CONFIG_DYNAMIC_THREAD_ALLOC)) { in z_impl_k_thread_stack_alloc()
[all …]
Dthread.c335 uint32_t *stack; in z_check_stack_sentinel() local
341 stack = (uint32_t *)arch_current_thread()->stack_info.start; in z_check_stack_sentinel()
342 if (*stack != STACK_SENTINEL) { in z_check_stack_sentinel()
344 *stack = STACK_SENTINEL; in z_check_stack_sentinel()
384 k_thread_stack_t *stack, size_t stack_size) in setup_thread_stack() argument
391 if (z_stack_is_user_capable(stack)) { in setup_thread_stack()
393 stack_buf_start = K_THREAD_STACK_BUFFER(stack); in setup_thread_stack()
400 stack_buf_start = K_KERNEL_STACK_BUFFER(stack); in setup_thread_stack()
423 void *stack_mapped = k_mem_map_phys_guard((uintptr_t)stack, stack_obj_size, in setup_thread_stack()
430 if (z_stack_is_user_capable(stack)) { in setup_thread_stack()
[all …]
Ddynamic_disabled.c20 int z_impl_k_thread_stack_free(k_thread_stack_t *stack) in z_impl_k_thread_stack_free() argument
22 ARG_UNUSED(stack); in z_impl_k_thread_stack_free()
/Zephyr-latest/modules/canopennode/
DCMakeLists.txt11 ${CANOPENNODE_DIR}/stack
17 ${CANOPENNODE_DIR}/stack/CO_Emergency.c
18 ${CANOPENNODE_DIR}/stack/CO_HBconsumer.c
19 ${CANOPENNODE_DIR}/stack/CO_LSSmaster.c
20 ${CANOPENNODE_DIR}/stack/CO_LSSslave.c
21 ${CANOPENNODE_DIR}/stack/CO_NMT_Heartbeat.c
22 ${CANOPENNODE_DIR}/stack/CO_PDO.c
23 ${CANOPENNODE_DIR}/stack/CO_SDO.c
24 ${CANOPENNODE_DIR}/stack/CO_SDOmaster.c
25 ${CANOPENNODE_DIR}/stack/CO_SYNC.c
[all …]
/Zephyr-latest/lib/utils/
Drb.c80 struct rbnode **stack) in find_and_stack() argument
84 stack[sz] = tree->root; in find_and_stack()
87 while (stack[sz - 1] != node) { in find_and_stack()
88 uint8_t side = tree->lessthan_fn(node, stack[sz - 1]) ? 0U : 1U; in find_and_stack()
89 struct rbnode *ch = get_child(stack[sz - 1], side); in find_and_stack()
92 stack[sz] = ch; in find_and_stack()
130 static void rotate(struct rbnode **stack, int stacksz) in rotate() argument
134 struct rbnode *parent = stack[stacksz - 2]; in rotate()
135 struct rbnode *child = stack[stacksz - 1]; in rotate()
141 struct rbnode *grandparent = stack[stacksz - 3]; in rotate()
[all …]
/Zephyr-latest/tests/kernel/threads/dynamic_thread_stack/src/
Dmain.c43 k_thread_stack_t *stack; in ZTEST_USER() local
57 stack = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, K_USER); in ZTEST_USER()
58 zassert_not_null(stack); in ZTEST_USER()
63 tid = k_thread_create(th, stack, CONFIG_DYNAMIC_THREAD_STACK_SIZE, func, in ZTEST_USER()
71 zassert_ok(k_thread_stack_free(stack)); in ZTEST_USER()
79 static k_thread_stack_t *stack[CONFIG_DYNAMIC_THREAD_POOL_SIZE]; in ZTEST() local
87 stack[i] = k_thread_stack_alloc(CONFIG_DYNAMIC_THREAD_STACK_SIZE, in ZTEST()
90 zassert_not_null(stack[i]); in ZTEST()
107 tid[i] = k_thread_create(&th[i], stack[i], in ZTEST()
121 zassert_ok(k_thread_stack_free(stack[i])); in ZTEST()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/mesh/tests_scripts/persistence/
Dcfg.sh13 -- -argstest stack-cfg=0
17 -- -argstest stack-cfg=0
21 -- -argstest stack-cfg=1
25 -- -argstest stack-cfg=1
29 -- -argstest stack-cfg=0
33 -- -argstest stack-cfg=0
37 -- -argstest stack-cfg=1
41 -- -argstest stack-cfg=1
/Zephyr-latest/tests/kernel/stack/stack/src/
Dtest_stack_fail.c16 extern struct k_stack stack;
47 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
49 stack_pop_fail(&stack); in ZTEST()
61 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
64 tStack_pop_entry, &stack, in ZTEST()
70 zassert_true(k_stack_cleanup(&stack) == -EAGAIN, "The stack is cleanuped successful"); in ZTEST()
84 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
86 zassert_true(k_stack_push(&stack, tx_data[i]) == 0, "push data into stack failed"); in ZTEST()
89 zassert_true(k_stack_push(&stack, data_tmp) == -ENOMEM, "push data successful"); in ZTEST()
Dtest_stack_contexts.c18 struct k_stack stack; variable
119 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
120 tstack_thread_thread(&stack); in ZTEST()
150 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
151 tstack_thread_isr(&stack); in ZTEST()
235 k_stack_init(&stack, data, STACK_LEN); in ZTEST()
251 &stack, NULL, NULL, in ZTEST()
256 &stack, NULL, NULL, in ZTEST()
264 &stack, NULL, NULL, in ZTEST()
271 k_stack_push(&stack, test_data[0]); in ZTEST()
[all …]
/Zephyr-latest/tests/arch/x86/nmi/src/
Dmain.c40 uint64_t stack; in z_x86_do_kernel_nmi() local
42 _get_esp(stack); in z_x86_do_kernel_nmi()
44 TC_PRINT("ESP: 0x%llx CPU %d nmi_stack %p\n", stack, in z_x86_do_kernel_nmi()
47 zassert_true(stack > (uint64_t)nmi_stacks[arch_curr_cpu()->id] && in z_x86_do_kernel_nmi()
48 stack < (uint64_t)nmi_stacks[arch_curr_cpu()->id] + in z_x86_do_kernel_nmi()
/Zephyr-latest/doc/kernel/services/data_passing/
Dstacks.rst6 A :dfn:`stack` is a kernel object that implements a traditional
17 Any number of stacks can be defined (limited only by available RAM). Each stack
20 A stack has the following key properties:
30 A stack must be initialized before it can be used. This sets its queue to empty.
32 A data value can be **added** to a stack by a thread or an ISR.
38 and prevent attempts to add a data value to a stack that has already reached
39 its maximum quantity of queued values. Adding a data value to a stack that is
42 A data value may be **removed** from a stack by a thread.
43 If the stack's queue is empty a thread may choose to wait for it to be given.
44 Any number of threads may wait on an empty stack simultaneously.
[all …]
/Zephyr-latest/subsys/usb/host/
DKconfig6 bool "USB host stack [EXPERIMENTAL]"
10 New experimental USB host stack.
31 int "USB host stack thread stack size"
34 USB host stack thread stack size in bytes.
/Zephyr-latest/doc/kernel/usermode/
Dmpu_userspace.rst7 set of stacks. These stacks exist in a 1:1 relationship with each thread stack
12 ELF file and finds all of the thread stack objects. A set of privileged
16 During the process of dropping a thread to user mode, the privileged stack
18 infrastructure to configure the MPU regions properly for the thread stack and
23 to privileged mode, the stack is switched to use the privileged stack, and the
25 thread is set back to user mode and the stack is restored to the user stack.
Dmpu_stack_objects.rst14 implementation of other features such as stack protection and userspace. The
30 occur, a fault ensues. The stack guard is defined at the bottom (the lowest
31 address) of the stack.
36 During stack creation, a set of constraints are enforced on the allocation of
37 memory. These constraints include determining the alignment of the stack and
38 the correct sizing of the stack. During linking of the binary, these
48 This means that a 1500 byte stack should be aligned to a 2kB boundary and the
49 stack size should also be adjusted to 2kB to ensure that nothing else is
61 Size and alignment constraints may result in stack allocations being larger
63 some added complexity when implementing stack guards.
/Zephyr-latest/subsys/net/ip/
DKconfig.stack9 int "TX thread stack size"
12 Set the TX thread stack size in bytes. The TX thread is waiting
15 This value is a baseline and the actual TX stack size might
19 int "RX thread stack size"
22 Set the RX thread stack size in bytes. The RX thread is waiting
24 This value is a baseline and the actual RX stack size might
/Zephyr-latest/subsys/usb/device_next/
DKconfig6 bool "New USB device stack [EXPERIMENTAL]"
11 New experimental USB device stack.
32 int "USB device stack thread stack size"
35 USB device stack thread stack size in bytes.
55 Message work may need to be delayed because the device stack is not
/Zephyr-latest/tests/benchmarks/latency_measure/src/
Dstack.c27 static struct k_stack stack; variable
42 (void) k_stack_push(&stack, 1234); in stack_push_pop_thread_entry()
46 (void) k_stack_pop(&stack, &data, K_NO_WAIT); in stack_push_pop_thread_entry()
71 k_stack_init(&stack, stack_array, MAX_ITEMS); in stack_ops()
80 k_thread_access_grant(&start_thread, &pause_sem, &stack); in stack_ops()
129 k_stack_pop(&stack, &data, K_FOREVER); in alt_thread_entry()
159 k_stack_push(&stack, (stack_data_t)123); in start_thread_entry()
191 k_thread_access_grant(&start_thread, &alt_thread, &pause_sem, &stack); in stack_blocking_ops()
192 k_thread_access_grant(&alt_thread, &pause_sem, &stack); in stack_blocking_ops()
/Zephyr-latest/drivers/modem/
DKconfig.wncm14a2a18 int "Size of the stack for the WNC-M14A2A modem driver RX thread"
21 This stack is used by the WNCM14A2A RX thread.
24 int "Size of the stack for the WNC-M14A2A modem driver work queue"
27 This stack is used by the work queue to pass off net_pkt data
28 to the rest of the network stack, letting the rx thread continue
45 Note that the priority needs to be lower than the net stack
/Zephyr-latest/arch/posix/
DKconfig19 In bytes, stack size for Zephyr threads meant only for the POSIX
22 thread stack, the real stack is the native underlying pthread stack.
23 Therefore the allocated stack can be limited to this size)
/Zephyr-latest/arch/arm/core/cortex_a_r/
DKconfig31 int "Undefined Instruction and Abort stack size (in bytes)"
34 This option specifies the size of the stack used by the undefined
38 int "FIQ stack size (in bytes)"
41 This option specifies the size of the stack used by the FIQ handler.
44 int "SVC stack size (in bytes)"
47 This option specifies the size of the stack used by the SVC handler.
50 int "SYS stack size (in bytes)"
53 This option specifies the size of the stack used by the system mode.
180 int "Undefined Instruction and Abort stack size (in bytes)"
183 This option specifies the size of the stack used by the undefined
[all …]
/Zephyr-latest/doc/connectivity/usb/device_next/api/
Dusbd.rst3 USB device stack (next) API
6 New USB device stack API is experimental and is subject to change without notice.
/Zephyr-latest/include/zephyr/modem/backend/
Dtty.h27 k_thread_stack_t *stack; member
34 k_thread_stack_t *stack; member
/Zephyr-latest/subsys/mgmt/mcumgr/grp/settings_mgmt/
DKconfig20 Selects if the stack or heap will be used for variables that are
26 Use a fixed size stack buffer, any user-supplied values longer than
29 Note that stack usage for parameter storage alone will be
31 therefore the MCUmgr stack should be appropriately sized.
48 variable if placed on the stack or the maximum allocated size of the
56 variable if placed on the stack or the allocated size of the
/Zephyr-latest/scripts/
Dcheckstack.pl37 my (@stack, $re, $dre, $x, $xs, $funcre);
155 push @stack, "$intro$size\n";
171 push @stack, "$intro$size\n";
176 print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack;

12345678910>>...35