Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ca/source/baidu_ca_mutex.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | // Copyright 2017 Baidu Inc. All Rights Reserved. |
| TMBOY | 47:9e361da97763 | 2 | // Author: Su Hao (suhao@baidu.com) |
| TMBOY | 47:9e361da97763 | 3 | // |
| TMBOY | 47:9e361da97763 | 4 | // Description: Wrapper for mutex |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H |
| TMBOY | 47:9e361da97763 | 7 | #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H |
| TMBOY | 47:9e361da97763 | 8 | |
| TMBOY | 47:9e361da97763 | 9 | #include "baidu_ca_types.h" |
| TMBOY | 47:9e361da97763 | 10 | #include "baidu_ca.h" |
| TMBOY | 47:9e361da97763 | 11 | |
| TMBOY | 47:9e361da97763 | 12 | /* |
| TMBOY | 47:9e361da97763 | 13 | * Create mutex context |
| TMBOY | 47:9e361da97763 | 14 | * |
| TMBOY | 47:9e361da97763 | 15 | * @Return bca_mutex_t, the created mutex context |
| TMBOY | 47:9e361da97763 | 16 | */ |
| TMBOY | 47:9e361da97763 | 17 | BCA_INT bca_mutex_t bca_mutex_create(void); |
| TMBOY | 47:9e361da97763 | 18 | |
| TMBOY | 47:9e361da97763 | 19 | /* |
| TMBOY | 47:9e361da97763 | 20 | * Mutex lock |
| TMBOY | 47:9e361da97763 | 21 | * |
| TMBOY | 47:9e361da97763 | 22 | * @Return bca_mutex_t, the mutex context |
| TMBOY | 47:9e361da97763 | 23 | */ |
| TMBOY | 47:9e361da97763 | 24 | BCA_INT bca_status_t bca_mutex_lock(bca_mutex_t mutex); |
| TMBOY | 47:9e361da97763 | 25 | |
| TMBOY | 47:9e361da97763 | 26 | /* |
| TMBOY | 47:9e361da97763 | 27 | * Mutex unlock |
| TMBOY | 47:9e361da97763 | 28 | * |
| TMBOY | 47:9e361da97763 | 29 | * @Return bca_mutex_t, the mutex context |
| TMBOY | 47:9e361da97763 | 30 | */ |
| TMBOY | 47:9e361da97763 | 31 | BCA_INT bca_status_t bca_mutex_unlock(bca_mutex_t mutex); |
| TMBOY | 47:9e361da97763 | 32 | |
| TMBOY | 47:9e361da97763 | 33 | /* |
| TMBOY | 47:9e361da97763 | 34 | * Destroy the mutex context |
| TMBOY | 47:9e361da97763 | 35 | * |
| TMBOY | 47:9e361da97763 | 36 | * @Return bca_mutex_t, the mutex context |
| TMBOY | 47:9e361da97763 | 37 | */ |
| TMBOY | 47:9e361da97763 | 38 | BCA_INT bca_status_t bca_mutex_destroy(bca_mutex_t mutex); |
| TMBOY | 47:9e361da97763 | 39 | |
| TMBOY | 47:9e361da97763 | 40 | #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H |
