gcc_atomic.h 537 B

12345678910111213141516171819202122232425
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. */
  6. #ifndef MSGPACK_GCC_ATOMIC_H
  7. #define MSGPACK_GCC_ATOMIC_H
  8. #if defined(__cplusplus)
  9. extern "C" {
  10. #endif
  11. typedef int _msgpack_atomic_counter_t;
  12. int _msgpack_sync_decr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
  13. int _msgpack_sync_incr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
  14. #if defined(__cplusplus)
  15. }
  16. #endif
  17. #endif // MSGPACK_GCC_ATOMIC_H