ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers baidu_ca_mutex.h Source File

baidu_ca_mutex.h

00001 // Copyright 2017 Baidu Inc. All Rights Reserved.
00002 // Author: Su Hao (suhao@baidu.com)
00003 //
00004 // Description: Wrapper for mutex
00005 
00006 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H
00007 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H
00008 
00009 #include "baidu_ca_types.h"
00010 #include "baidu_ca.h"
00011 
00012 /*
00013  * Create mutex context
00014  *
00015  * @Return bca_mutex_t, the created mutex context
00016  */
00017 BCA_INT bca_mutex_t bca_mutex_create(void);
00018 
00019 /*
00020  * Mutex lock
00021  *
00022  * @Return bca_mutex_t, the mutex context
00023  */
00024 BCA_INT bca_status_t bca_mutex_lock(bca_mutex_t mutex);
00025 
00026 /*
00027  * Mutex unlock
00028  *
00029  * @Return bca_mutex_t, the mutex context
00030  */
00031 BCA_INT bca_status_t bca_mutex_unlock(bca_mutex_t mutex);
00032 
00033 /*
00034  * Destroy the mutex context
00035  *
00036  * @Return bca_mutex_t, the mutex context
00037  */
00038 BCA_INT bca_status_t bca_mutex_destroy(bca_mutex_t mutex);
00039 
00040 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_MUTEX_H