This is Unofficial EPICS BASE Doxygen Site
epicsAtomicOSD.h
Go to the documentation of this file.
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 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 
11 /*
12  * Author Jeffrey O. Hill
13  * johill@lanl.gov
14  */
15 
16 #ifndef epicsAtomicOSD_h
17 #define epicsAtomicOSD_h
18 
19 #include <libComAPI.h>
20 #include "epicsMMIO.h"
21 #include "compilerSpecific.h"
22 #include "epicsInterrupt.h"
23 
24 #define EPICS_ATOMIC_OS_NAME "RTEMS"
25 
26 typedef struct EpicsAtomicLockKey {
27  int key;
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33 
34 #ifndef EPICS_ATOMIC_READ_MEMORY_BARRIER
36 {
38 }
39 #endif
40 
41 #ifndef EPICS_ATOMIC_READ_MEMORY_BARRIER
43 {
44  rwbarr();
45 }
46 #endif
47 
49 {
50  pkey->key = epicsInterruptLock();
51 }
52 
54 {
56 }
57 
58 #ifdef __cplusplus
59 } /* end of extern "C" */
60 #endif /* __cplusplus */
61 
62 #include "epicsAtomicDefault.h"
63 
64 #endif /* epicsAtomicOSD_h */
65 
LIBCOM_API void epicsInterruptUnlock(int key)
Definition: osdInterrupt.c:41
struct EpicsAtomicLockKey EpicsAtomicLockKey
LIBCOM_API void epicsAtomicLock(struct EpicsAtomicLockKey *)
LIBCOM_API int epicsInterruptLock(void)
Definition: osdInterrupt.c:34
#define rwbarr()
Explicit read/write memory barrier Prevents reordering of reads or writes around it.
Definition: epicsMMIODef.h:206
#define EPICS_ATOMIC_INLINE
Definition: epicsAtomic.h:22
EPICS_ATOMIC_INLINE void epicsAtomicWriteMemoryBarrier(void)
LIBCOM_API void epicsAtomicUnlock(struct EpicsAtomicLockKey *)
LIBCOM_API void epicsAtomicMemoryBarrierFallback(void)
EPICS_ATOMIC_INLINE void epicsAtomicReadMemoryBarrier(void)