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

47 lines
1.1 KiB
C
Raw Normal View History

/*
* Copyright (C) 2014 Freie Universität Berlin
*
* 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.
*/
/**
* @ingroup core_arch
* @{
*
* @file atomic_arch.h
* @brief Architecture dependent interface for an atomic set operation
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef __ATOMIC_ARCH_H
#define __ATOMIC_ARCH_H
/**
* @brief Define mappings between arch and internal interfaces
2014-05-14 10:46:15 +02:00
*
* This mapping is done for compatibility of existing platforms,
* new platforms should always use the *_arch_* interfaces.
* @{
*/
#ifdef COREIF_NG
#define atomic_set_return atomic_arch_set_return
#endif
/** @} */
/**
* @brief Set a value atomically without interruption from interrupts etc.
*
* @param[out] to_set variable to set
* @param[in] value value to set to_set to
*
* @return the value that was set
*/
unsigned int atomic_arch_set_return(unsigned int *to_set, unsigned int value);
#endif /* __ATOMIC_ARCH_H */
/** @} */