Semaphore Class.
更多...
#include <cpp_semaphore.h>
◆ count_get()
kstat_t count_get |
( |
sem_count_t * |
count | ) |
|
This function will get count of a semaphore
- 参数
-
[out] | count | count of the semaphore |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ count_set()
kstat_t count_set |
( |
sem_count_t |
count | ) |
|
This function will set the count of a semaphore
- 参数
-
[in] | sem_count | count of the semaphore |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ create()
kstat_t create |
( |
const name_t * |
name, |
|
|
sem_count_t |
count |
|
) |
| |
This function will create a semaphore
- 参数
-
[in] | name | name of the semaphore |
[in] | count | the init count of the semaphore |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ destroy()
This function will delete a semaphore
- 参数
-
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ release()
This function will release a semaphore
- 参数
-
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ release_all()
kstat_t release_all |
( |
void |
| ) |
|
This function will release all semaphore
- 参数
-
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
◆ self()
◆ wait()
kstat_t wait |
( |
uint32_t |
millisec | ) |
|
This function will wait a semaphore
- 参数
-
[in] | millisec | millisec to wait before take |
- 返回
- the operation status, RHINO_SUCCESS is OK, others is error
该类的文档由以下文件生成:
- /Users/yaoqiuguo/workspace/aos33/components/cplusplus/include/cpp_semaphore.h