1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
osal_spinlock-h.md 8.48 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

osal_spinlock.h

Overview

Related Modules:

OSAL

Description:

Declares spinlock types and interfaces.

This file provides the interfaces for initializing, destroying, obtaining, and releasing a spinlock, the interfaces for obtaining a spinlock and disabling the interrupt request (IRQ), releasing a spinlock and enabling the IRQ, obtaining a spinlock, disabling the IRQ, and saving its status, and releasing a spinlock, enabling the IRQ, and restoring the saved IRQ status. The spinlock needs to be destroyed when it is no longer used.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

OsalSpinlock

Describes a spinlock.

Macros

Macro Name and Value

Description

OSAL_DECLARE_SPINLOCK(spinlock)   OsalSpinlock spinlock

Defines a spinlock.

Functions

Function Name

Description

OsalSpinInit (OsalSpinlock *spinlock)

int32_t 

Initializes a spinlock.

OsalSpinDestroy (OsalSpinlock *spinlock)

int32_t 

Destroys a spinlock.

OsalSpinLock (OsalSpinlock *spinlock)

int32_t 

Obtains a spinlock.

OsalSpinUnlock (OsalSpinlock *spinlock)

int32_t 

Releases a spinlock.

OsalSpinLockIrq (OsalSpinlock *spinlock)

int32_t 

Obtains a spinlock and disables the IRQ.

OsalSpinUnlockIrq (OsalSpinlock *spinlock)

int32_t 

Releases a spinlock and enables the IRQ.

OsalSpinLockIrqSave (OsalSpinlock *spinlock, uint32_t *flags)

int32_t 

Obtains a spinlock, disables the IRQ, and saves its status.

OsalSpinUnlockIrqRestore (OsalSpinlock *spinlock, uint32_t *flags)

int32_t 

Releases a spinlock, enables the IRQ, and restores the saved IRQ status.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助