Mutex类 参考

Mutex Class. 更多...

#include <cpp_mutex.h>

Public 成员函数

kstat_t create (const name_t *name)
 This function will create a mutex 更多...
 
kstat_t destroy (void)
 This function will delete a mutex 更多...
 
kstat_t lock (uint32_t millisec)
 This function will lock mutex 更多...
 
kstat_t unlock (void)
 This function will unlock a mutex 更多...
 
kmutex_t * self (void)
 This function will get a Mutex struct pointer 更多...
 

详细描述

Mutex Class.

在文件 cpp_mutex.h30 行定义.

成员函数说明

◆ create()

kstat_t create ( const name_t *  name)

This function will create a mutex

参数
[in]namename of the mutex
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ destroy()

kstat_t destroy ( void  )

This function will delete a mutex

参数
[in]NULL
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ lock()

kstat_t lock ( uint32_t  millisec)

This function will lock mutex

参数
[in]millisecmillisec to be wait for before lock
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ self()

kmutex_t* self ( void  )

This function will get a Mutex struct pointer

参数
[in]none
返回
Mutex struct pointer

◆ unlock()

kstat_t unlock ( void  )

This function will unlock a mutex

参数
[in]NULL
返回
the operation status, RHINO_SUCCESS is OK, others is error

该类的文档由以下文件生成: