P99
p99_atomic_gcc.h
Go to the documentation of this file.
1 /* This may look like nonsense, but it really is -*- mode: C; coding: utf-8 -*- */
2 /* */
3 /* Except for parts copied from previous work and as explicitly stated below, */
4 /* the author and copyright holder for this work is */
5 /* (C) copyright 2012, 2014 Jens Gustedt, INRIA, France */
6 /* */
7 /* This file is free software; it is part of the P99 project. */
8 /* */
9 /* Licensed under the Apache License, Version 2.0 (the "License"); */
10 /* you may not use this file except in compliance with the License. */
11 /* You may obtain a copy of the License at */
12 /* */
13 /* http://www.apache.org/licenses/LICENSE-2.0 */
14 /* */
15 /* Unless required by applicable law or agreed to in writing, software */
16 /* distributed under the License is distributed on an "AS IS" BASIS, */
17 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
18 /* See the License for the specific language governing permissions and */
19 /* limitations under the License. */
20 /* */
21 #ifndef P99_ATOMIC_GCC_H
22 #define P99_ATOMIC_GCC_H 1
23 
24 #ifndef P99_ATOMIC_H
25 # warning "never include this file directly, use p99_atomic.h, instead"
26 #endif
27 
28 #include "p99_args.h"
29 
38 #if defined(__ATOMIC_RELAXED) && !defined(P99_GCC_USE_SYNC)
39 # include "p99_atomic_gcc_atomic.h"
40 #else
41 # include "p99_atomic_gcc_sync.h"
42 #endif
43 
44 #endif
p99_args.h
Providing macros that handle variadic macro argument lists.
p99_atomic_gcc_sync.h
Implement some of the atomic operations as fallback to gcc' __sync builtins.
p99_atomic_gcc_atomic.h
Implement some of the atomic operations as fallback to gcc' __atomic builtins.