-
Notifications
You must be signed in to change notification settings - Fork 10
/
duma_sem.h
59 lines (49 loc) · 1.95 KB
/
duma_sem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* DUMA - Red-Zone memory allocator.
* Copyright (C) 2002-2005 Hayati Ayguen <[email protected]>, Procitec GmbH
* License: GNU LGPL (GNU Lesser General Public License, see COPYING-GPL)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* FILE CONTENTS:
* internal header file
*/
#ifndef DUMA_SEM_INC_H
#define DUMA_SEM_INC_H
#ifndef DUMA_NO_THREAD_SAFETY
#ifdef __cplusplus
extern "C" {
#endif
void DUMA_init_sem(void);
void DUMA_get_sem(void);
int DUMA_rel_sem(int retval);
#ifdef __cplusplus
} /* extern "C" */
#endif
#define DUMA_INIT_SEMAPHORE() DUMA_init_sem()
#define DUMA_GET_SEMAPHORE() DUMA_get_sem()
#define DUMA_RELEASE_SEMAPHORE(x) DUMA_rel_sem(x)
#else /* DUMA_NO_THREAD_SAFETY */
#define DUMA_INIT_SEMAPHORE() \
do { \
} while (0)
#define DUMA_GET_SEMAPHORE() \
do { \
} while (0)
#define DUMA_RELEASE_SEMAPHORE(x) \
do { \
} while (0)
#endif /* DUMA_NO_THREAD_SAFETY */
#endif /* DUMA_SEM_INC_H */