chromium/third_party/grpc/src/include/grpc/support/atm_gcc_atomic.h

/*
 *
 * Copyright 2015 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H
#define GRPC_SUPPORT_ATM_GCC_ATOMIC_H

// IWYU pragma: private, include <grpc/support/atm.h>

/* atm_platform.h for gcc and gcc-like compilers with the
   __atomic_* interface.  */
#include <grpc/support/port_platform.h>

#ifdef __cplusplus
extern "C" {
#endif

gpr_atm;
#define GPR_ATM_MAX
#define GPR_ATM_MIN

#define gpr_atm_full_barrier()

#define gpr_atm_acq_load(p)
#define gpr_atm_no_barrier_load(p)
#define gpr_atm_rel_store(p, value)
#define gpr_atm_no_barrier_store(p, value)

#define gpr_atm_no_barrier_fetch_add(p, delta)
#define gpr_atm_full_fetch_add(p, delta)

static __inline int gpr_atm_no_barrier_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {}

static __inline int gpr_atm_acq_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {}

static __inline int gpr_atm_rel_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {}

static __inline int gpr_atm_full_cas(gpr_atm* p, gpr_atm o, gpr_atm n) {}

#define gpr_atm_full_xchg(p, n)

#ifdef __cplusplus
}
#endif

#endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */