1 /*
2  * %CopyrightBegin%
3  *
4  * Copyright Ericsson AB 2010-2016. All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * %CopyrightEnd%
19  */
20 
21 /*
22  * Description: Native atomics ethread support using libatomic_ops
23  * Author: Rickard Green
24  */
25 
26 #ifndef ETHREAD_LIBATOMIC_OPS_H__
27 #define ETHREAD_LIBATOMIC_OPS_H__
28 
29 #if (defined(ETHR_HAVE_LIBATOMIC_OPS) \
30      && ((ETHR_SIZEOF_AO_T == 4 && !defined(ETHR_HAVE_NATIVE_ATOMIC32)) \
31 	 || (ETHR_SIZEOF_AO_T == 8 && !defined(ETHR_HAVE_NATIVE_ATOMIC64))))
32 
33 #if defined(__x86_64__)
34 #define AO_USE_PENTIUM4_INSTRS
35 #endif
36 
37 #define ETHR_NATIVE_IMPL__ "libatomic_ops"
38 
39 #include "atomic_ops.h"
40 #include "ethr_membar.h"
41 #include "ethr_atomic.h"
42 #include "ethr_dw_atomic.h"
43 
44 #endif
45 
46 #endif
47