VSF Documented
SDL_mutex.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_SDL2_MUTEX_H__
19#define __VSF_SDL2_MUTEX_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "../../vsf_sdl2_cfg.h"
24
25#if VSF_USE_SDL2 == ENABLED
26
27#include "kernel/vsf_kernel.h"
28#include "SDL_stdinc.h"
29
30#include "begin_code.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*============================ MACROS ========================================*/
37/*============================ MACROFIED FUNCTIONS ===========================*/
38
39#if VSF_SDL_CFG_WRAPPER == ENABLED
40#define SDL_CreateMutex VSF_SDL_WRAPPER(SDL_CreateMutex)
41#define SDL_DestroyMutex VSF_SDL_WRAPPER(SDL_DestroyMutex)
42#define SDL_TryLockMutex VSF_SDL_WRAPPER(SDL_TryLockMutex)
43#define SDL_LockMutex VSF_SDL_WRAPPER(SDL_LockMutex)
44#define SDL_UnlockMutex VSF_SDL_WRAPPER(SDL_UnlockMutex)
45#endif
46
47/*============================ TYPES =========================================*/
48
50
51/*============================ GLOBAL VARIABLES ==============================*/
52/*============================ LOCAL VARIABLES ===============================*/
53/*============================ PROTOTYPES ====================================*/
54
55extern SDL_mutex* SDL_CreateMutex(void);
56extern void SDL_DestroyMutex(SDL_mutex * mutex);
57extern int SDL_TryLockMutex(SDL_mutex * mutex);
58extern int SDL_LockMutex(SDL_mutex * mutex);
59extern int SDL_UnlockMutex(SDL_mutex * mutex);
60
61#ifdef __cplusplus
62}
63#endif
64#include "close_code.h"
65
66#endif // VSF_USE_SDL2
67#endif // __VSF_SDL2_MUTEX_H__
68/* EOF */
#define SDL_TryLockMutex
Definition SDL_mutex.h:42
#define SDL_LockMutex
Definition SDL_mutex.h:43
vsf_mutex_t SDL_mutex
Definition SDL_mutex.h:49
#define SDL_CreateMutex
Definition SDL_mutex.h:40
#define SDL_DestroyMutex
Definition SDL_mutex.h:41
#define SDL_UnlockMutex
Definition SDL_mutex.h:44
Definition vsf_eda.h:892
Definition mutex.h:10