1 //******************************************************************
3 // Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 //*********************************************************************
26 * This file provides APIs related to mutex with no operation
27 * for Singlethread implementation.
34 * Logging tag for module name
38 typedef struct _tagMutexInfo_t
42 typedef struct _tagEventInfo_t
48 * @brief This is used to return a non NULL value for ca_mutex_new().
50 static ca_mutex_internal g_mutexInfo = { 0 };
54 * @brief This is used to return a non NULL value for ca_cond_new().
56 static ca_cond_internal g_condInfo = { 0 };
58 ca_mutex ca_mutex_new(void)
63 bool ca_mutex_free(ca_mutex mutex)
68 void ca_mutex_lock(ca_mutex mutex)
73 void ca_mutex_unlock(ca_mutex mutex)
78 ca_cond ca_cond_new(void)
83 void ca_cond_free(ca_cond cond)
88 void ca_cond_signal(ca_cond cond)
93 void ca_cond_broadcast(ca_cond cond)
98 void ca_cond_wait(ca_cond cond, ca_mutex mutex)
103 CAWaitResult_t ca_cond_wait_for(ca_cond cond, ca_mutex mutex, uint64_t microseconds)
105 return CA_WAIT_SUCCESS;