• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef MOCK_FFRT_API_C_MUTEX_H
16 #define MOCK_FFRT_API_C_MUTEX_H
17 
18 #include "type_def.h"
ffrt_mutexattr_init(ffrt_mutexattr_t * attr)19 inline FFRT_C_API int ffrt_mutexattr_init(ffrt_mutexattr_t *attr)
20 {
21     return 0;
22 }
23 
ffrt_mutexattr_settype(ffrt_mutexattr_t * attr,int type)24 inline FFRT_C_API int ffrt_mutexattr_settype(ffrt_mutexattr_t *attr, int type)
25 {
26     return 0;
27 }
28 
ffrt_mutexattr_gettype(ffrt_mutexattr_t * attr,int * type)29 inline FFRT_C_API int ffrt_mutexattr_gettype(ffrt_mutexattr_t *attr, int *type)
30 {
31     return 0;
32 }
33 
ffrt_mutexattr_destroy(ffrt_mutexattr_t * attr)34 inline FFRT_C_API int ffrt_mutexattr_destroy(ffrt_mutexattr_t *attr)
35 {
36     return 0;
37 }
38 
ffrt_mutex_init(ffrt_mutex_t * mutex,const ffrt_mutexattr_t * attr)39 inline FFRT_C_API int ffrt_mutex_init(ffrt_mutex_t *mutex, const ffrt_mutexattr_t *attr)
40 {
41     return 0;
42 }
43 
ffrt_mutex_lock(ffrt_mutex_t * mutex)44 inline FFRT_C_API int ffrt_mutex_lock(ffrt_mutex_t *mutex)
45 {
46     return 0;
47 }
48 
ffrt_mutex_unlock(ffrt_mutex_t * mutex)49 inline FFRT_C_API int ffrt_mutex_unlock(ffrt_mutex_t *mutex)
50 {
51     return 0;
52 }
53 
ffrt_mutex_trylock(ffrt_mutex_t * mutex)54 inline FFRT_C_API int ffrt_mutex_trylock(ffrt_mutex_t *mutex)
55 {
56     return 0;
57 }
58 
ffrt_mutex_destroy(ffrt_mutex_t * mutex)59 inline FFRT_C_API int ffrt_mutex_destroy(ffrt_mutex_t *mutex)
60 {
61     return 0;
62 }
63 
64 #endif