Lazuli
Loading...
Searching...
No Matches
spinlock.c
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-3.0-only
3 * This file is part of Lazuli.
4 */
5
14#include <Lazuli/common.h>
15#include <Lazuli/config.h>
16#include <Lazuli/spinlock.h>
17
18#include <Lazuli/sys/kernel.h>
19
20void
22{
24 if (NULL == spinlock) {
26 }
27 }
28
29 *spinlock = LZ_SPINLOCK_INIT;
30}
Basic type definitions and useful macros.
#define NULL
NULL pointer.
Definition common.h:70
Include appropriate config file.
const bool LZ_CONFIG_CHECK_NULL_PARAMETERS_IN_SPINLOCKS
When 1, always check for NULL functions parameters in spinlocks implementation.
void Kernel_ManageFailure(void)
Manage a failure that can happen in a function call.
Definition kernel.c:95
Kernel symbols definition.
void Lz_Spinlock_Unlock(Lz_Spinlock *const spinlock)
Unset the lock and leave region.
Definition spinlock.c:21
Spinlocks interface.
volatile uint8_t Lz_Spinlock
Type used to represent a spinlock.
Definition spinlock.h:26
#define LZ_SPINLOCK_INIT
Define the initialization value for the type Lz_Spinlock.
Definition spinlock.h:34