Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1
5
6#ifndef ZEPHYR_INCLUDE_CLEANUP_KERNEL_H_
7#define ZEPHYR_INCLUDE_CLEANUP_KERNEL_H_
8
13
14#if defined(CONFIG_SCOPE_CLEANUP_HELPERS)
15
16#include <zephyr/cleanup.h>
17#include <zephyr/kernel.h>
18
23
29 (void)k_mutex_unlock(_T));
35
41
46SCOPE_DEFER_DEFINE(k_heap_free, struct k_heap *, void *);
47
52SCOPE_DEFER_DEFINE(k_mem_slab_free, struct k_mem_slab *, void *);
53
59
65
71
75
76#endif /* defined(CONFIG_SCOPE_CLEANUP_HELPERS) */
77
78#endif /* ZEPHYR_INCLUDE_CLEANUP_KERNEL_H_ */
SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors SPDX-License-Identifier: Apache-2....
#define SCOPE_DEFER_DEFINE(_func,...)
Define a scoped defer type.
Definition cleanup.h:164
#define SCOPE_GUARD_DEFINE(_name, _type, _lock, _unlock)
Define a scoped guard type.
Definition cleanup.h:118
#define K_FOREVER
Generate infinite timeout delay.
Definition kernel.h:1666
void k_heap_free(struct k_heap *h, void *mem)
Free memory allocated by k_heap_alloc().
void k_free(void *ptr)
Free memory allocated from heap.
void k_mem_slab_free(struct k_mem_slab *slab, void *mem)
Free memory allocated from a memory slab.
int k_mutex_unlock(struct k_mutex *mutex)
Unlock a mutex.
int k_mutex_lock(struct k_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
void k_sem_give(struct k_sem *sem)
Give a semaphore.
int k_sem_take(struct k_sem *sem, k_timeout_t timeout)
Take a semaphore.
void k_sched_unlock(void)
Unlock the scheduler.
Public kernel APIs.
Definition kernel.h:5979
Mutex Structure.
Definition kernel.h:3402
Semaphore structure.
Definition kernel.h:3607