NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_hwspinlock.c File Reference

Hardware spinlock (HWSPINLOCK) HW driver source file. More...

#include <neorv32.h>

Functions

int neorv32_hwspinlock_available (void)
 
int neorv32_hwspinlock_acquire (int select)
 
void neorv32_hwspinlock_acquire_blocking (int select)
 
void neorv32_hwspinlock_release (int select)
 
int neorv32_hwspinlock_probe (int select)
 
void neorv32_hwspinlock_clear (void)
 

Detailed Description

Hardware spinlock (HWSPINLOCK) HW driver source file.

Function Documentation

◆ neorv32_hwspinlock_acquire()

int neorv32_hwspinlock_acquire ( int select)

Try to acquire hardware spinlock.

Parameters
selectSpinlock select (0..31).
Returns
zero if spinlock successfully acquired, non-zero otherwise.

◆ neorv32_hwspinlock_acquire_blocking()

void neorv32_hwspinlock_acquire_blocking ( int select)

Block until spinlock is acquired.

Parameters
selectSpinlock select (0..31).

◆ neorv32_hwspinlock_available()

int neorv32_hwspinlock_available ( void )

Check if hardware spinlock module was synthesized.

Returns
0 if HWSPINLOCK was not synthesized, 1 if HWSPINLOCK is available.

◆ neorv32_hwspinlock_clear()

void neorv32_hwspinlock_clear ( void )

Clear/release all hardware spinlocks.

◆ neorv32_hwspinlock_probe()

int neorv32_hwspinlock_probe ( int select)

Probe state of hardware spinlock.

Parameters
selectSpinlock select (0..31).
Returns
State of selected spinlock (0 = unlocked, 1 = locked/acquired).

◆ neorv32_hwspinlock_release()

void neorv32_hwspinlock_release ( int select)

Release hardware spinlock.

Parameters
selectSpinlock select (0..31).