tinyOS  v1.00
互斥信号量

tinyOS的互斥信号量的实现 More...

Data Structures

struct  _tMutex
 
struct  _tMutexInfo
 

Typedefs

typedef struct _tMutex tMutex
 
typedef struct _tMutexInfo tMutexInfo
 

Functions

void tMutexInit (tMutex *mutex)
 
uint32_t tMutexWait (tMutex *mutex, uint32_t waitTicks)
 
uint32_t tMutexNoWaitGet (tMutex *mutex)
 
uint32_t tMutexNotify (tMutex *mutex)
 
uint32_t tMutexDestroy (tMutex *mutex)
 
void tMutexGetInfo (tMutex *mutex, tMutexInfo *info)
 

Detailed Description

tinyOS的互斥信号量的实现

Author
01课堂 lishutong
Date
2017-06-01
Version
1.0

Typedef Documentation

◆ tMutex

typedef struct _tMutex tMutex

◆ tMutexInfo

typedef struct _tMutexInfo tMutexInfo

Function Documentation

◆ tMutexDestroy()

uint32_t tMutexDestroy ( tMutex mutex)

销毁信号量

Parameters
mutex销毁互斥信号量
Returns
因销毁该信号量而唤醒的任务数量

Definition at line 180 of file tMutex.c.

Here is the call graph for this function:

◆ tMutexGetInfo()

void tMutexGetInfo ( tMutex mutex,
tMutexInfo info 
)

查询状态信息

Parameters
mutex查询的互斥信号量
info状态查询存储的位置

Definition at line 218 of file tMutex.c.

Here is the call graph for this function:

◆ tMutexInit()

void tMutexInit ( tMutex mutex)

初始化互斥信号量

Parameters
mutex等待初始化的互斥信号量

Definition at line 23 of file tMutex.c.

Here is the call graph for this function:

◆ tMutexNotify()

uint32_t tMutexNotify ( tMutex mutex)

通知互斥信号量可用

Parameters
mutex操作的信号量
Returns
tErrorOwner/tErrorNoError

Definition at line 122 of file tMutex.c.

Here is the call graph for this function:

◆ tMutexNoWaitGet()

uint32_t tMutexNoWaitGet ( tMutex mutex)

获取信号量,如果没有获取到直接退出,不阻塞

Parameters
mutex等待的信号量
Returns
等待结果,tErrorResourceUnavaliable.tErrorNoError

Definition at line 91 of file tMutex.c.

Here is the call graph for this function:

◆ tMutexWait()

uint32_t tMutexWait ( tMutex mutex,
uint32_t  waitTicks 
)

等待信号量

Parameters
mutex等待的信号量
waitTicks最大等待的ticks数,为0表示无限等待
Returns
等待结果,tErrorResourceUnavaliable.tErrorNoError,tErrorTimeout

Definition at line 37 of file tMutex.c.

Here is the call graph for this function: