1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/core/include/atomic.h

37 lines
854 B
C
Raw Normal View History

/*
* Copyright (C) 2014 Freie Universität Berlin
*
2013-11-22 20:47:05 +01:00
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @addtogroup core_util
* @{
*
* @file atomic.h
* @brief Atomic getter and setter functions
*
* @author Freie Universität Berlin, Computer Systems & Telematics
* @author Kaspar Schleiser <kaspar@schleiser.de>
*/
#ifndef _ATOMIC_H
#define _ATOMIC_H
#include "arch/atomic_arch.h"
/**
* @brief Sets a new and returns the old value of a variable atomically
*
* @param[in] val The variable to be set
* @param[in] set The value to be written
*
* @return The old value of *val*
*/
unsigned int atomic_set_return(unsigned int *val, unsigned int set);
#endif /* _ATOMIC_H */
/** @} */