messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gcc_atomic.h Source File

gcc_atomic.h

00001 /*
00002  *    Distributed under the Boost Software License, Version 1.0.
00003  *    (See accompanying file LICENSE_1_0.txt or copy at
00004  *    http://www.boost.org/LICENSE_1_0.txt)
00005  */
00006 
00007 #ifndef MSGPACK_GCC_ATOMIC_H
00008 #define MSGPACK_GCC_ATOMIC_H
00009 
00010 #if defined(__cplusplus)
00011 extern "C" {
00012 #endif
00013 
00014 typedef int _msgpack_atomic_counter_t;
00015 
00016 int _msgpack_sync_decr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
00017 int _msgpack_sync_incr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
00018 
00019 
00020 #if defined(__cplusplus)
00021 }
00022 #endif
00023 
00024 
00025 #endif // MSGPACK_GCC_ATOMIC_H