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
2014-08-23 16:16:26 +02:00

36 lines
786 B
C

/*
* Copyright (C) 2014 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. 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 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 */
/** @} */