UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
src
compat
platform_semaphore.h
Go to the documentation of this file.
1
/*
2
* FILE: platform_semaphore.h
3
* AUTHORS: Martin Benes <martinbenesh@gmail.com>
4
* Lukas Hejtmanek <xhejtman@ics.muni.cz>
5
* Petr Holub <hopet@ics.muni.cz>
6
* Milos Liska <xliska@fi.muni.cz>
7
* Jiri Matela <matela@ics.muni.cz>
8
* Dalibor Matura <255899@mail.muni.cz>
9
* Ian Wesley-Smith <iwsmith@cct.lsu.edu>
10
*
11
* Copyright (c) 2005-2209 CESNET z.s.p.o.
12
*
13
* Redistribution and use in source and binary forms, with or without
14
* modification, is permitted provided that the following conditions
15
* are met:
16
*
17
* 1. Redistributions of source code must retain the above copyright
18
* notice, this list of conditions and the following disclaimer.
19
*
20
* 2. Redistributions in binary form must reproduce the above copyright
21
* notice, this list of conditions and the following disclaimer in the
22
* documentation and/or other materials provided with the distribution.
23
*
24
* 3. All advertising materials mentioning features or use of this software
25
* must display the following acknowledgement:
26
*
27
* This product includes software developed by CESNET z.s.p.o.
28
*
29
* 4. Neither the name of CESNET nor the names of its contributors may be used
30
* to endorse or promote products derived from this software without specific
31
* prior written permission.
32
*
33
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
34
* "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
35
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
36
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
37
* EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
38
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
40
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
42
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
43
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
44
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45
*
46
*
47
*/
48
49
#include "config.h"
50
#include "
config_unix.h
"
51
#include "
config_win32.h
"
52
53
#ifndef _PLATFORM_SEMAPHORE_H
54
#define _PLATFORM_SEMAPHORE_H
55
56
#ifdef __APPLE__
57
#include <mach/semaphore.h>
58
#include <mach/task.h>
59
60
typedef
semaphore_t sem_t;
61
#else
62
#include <semaphore.h>
63
#endif
/* __APPLE__ */
64
65
#ifdef __cplusplus
66
extern
"C"
{
67
#endif
// __cplusplus
68
69
void
platform_sem_init
(
void
* semStructure,
int
pshared,
int
initialValue);
70
void
platform_sem_post
(
void
* semStructure);
71
void
platform_sem_wait
(
void
* semStructure);
72
void
platform_sem_destroy
(
void
* semStructure);
73
74
#ifdef __cplusplus
75
}
76
#endif
// __cplusplus
77
78
#endif
/* _PLATFORM_SEMAPHORE_H */
config_unix.h
config_win32.h
platform_sem_post
void platform_sem_post(void *semStructure)
Definition
platform_semaphore.c:81
platform_sem_wait
void platform_sem_wait(void *semStructure)
Definition
platform_semaphore.c:90
platform_sem_init
void platform_sem_init(void *semStructure, int pshared, int initialValue)
Definition
platform_semaphore.c:67
platform_sem_destroy
void platform_sem_destroy(void *semStructure)
Definition
platform_semaphore.c:103
Generated on Wed Sep 25 2024 14:27:16 for UltraGrid by
1.12.0