EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
epicsAtomicOSD.h
1 
2 /*************************************************************************\
3 * Copyright (c) 2011 LANS LLC, as Operator of
4 * Los Alamos National Laboratory.
5 * Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
6 * National Laboratory.
7 * SPDX-License-Identifier: EPICS
8 * EPICS BASE is distributed subject to a Software License Agreement found
9 * in file LICENSE that is included with this distribution.
10 \*************************************************************************/
11 
12 /*
13  * Author Jeffrey O. Hill
15  */
16 
17 #ifndef epicsAtomicOSD_h
18 #define epicsAtomicOSD_h
19 
20 #include <libComAPI.h>
21 
22 #define EPICS_ATOMIC_OS_NAME "POSIX"
23 
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29 
30 LIBCOM_API void epicsAtomicLock ( struct EpicsAtomicLockKey * );
31 LIBCOM_API void epicsAtomicUnlock ( struct EpicsAtomicLockKey * );
32 LIBCOM_API void epicsAtomicMemoryBarrierFallback ( void );
33 
34 #ifndef EPICS_ATOMIC_READ_MEMORY_BARRIER
35 EPICS_ATOMIC_INLINE void epicsAtomicReadMemoryBarrier (void)
36 {
37  epicsAtomicMemoryBarrierFallback();
38 }
39 #endif
40 
41 #ifndef EPICS_ATOMIC_WRITE_MEMORY_BARRIER
42 EPICS_ATOMIC_INLINE void epicsAtomicWriteMemoryBarrier (void)
43 {
44  epicsAtomicMemoryBarrierFallback();
45 }
46 #endif
47 
48 #ifdef __cplusplus
49 } /* end of extern "C" */
50 #endif /* __cplusplus */
51 
52 #include "epicsAtomicDefault.h"
53 
54 #endif /* epicsAtomicOSD_h */
55