1 Star 0 Fork 4.9K

Lin_bruin / docs

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

osal_mutex.h

Overview

Related Modules:

OSAL

Description:

Declares mutex types and interfaces.

This file provides interfaces for initializing and destroying a mutex, locking a mutex, locking a mutex upon timeout, and unlocking a mutex. The mutex must be destroyed after being used.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name

Description

OsalMutex

Describes a mutex.

Macros

Macro Name and Value

Description

OSAL_DECLARE_MUTEX(mutex)   struct OsalMutex mutex

Defines a mutex.

Functions

Function Name

Description

OsalMutexInit (struct OsalMutex *mutex)

int32_t 

Initializes a mutex.

OsalMutexDestroy (struct OsalMutex *mutex)

int32_t 

Destroys a mutex.

OsalMutexLock (struct OsalMutex *mutex)

int32_t 

Locks a mutex.

OsalMutexTimedLock (struct OsalMutex *mutex, uint32_t ms)

int32_t 

Locks a mutex with a specified timeout duration.

OsalMutexUnlock (struct OsalMutex *mutex)

int32_t 

Unlocks a mutex.

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

搜索帮助