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

native: Remove generic atomic_set_return implementation

The removed implementation is the same as the generic implementation in core/atomic.c
This commit is contained in:
Joakim Gebart 2015-05-07 15:49:52 +02:00
parent 25c2bdba84
commit 46b9358e84

View File

@ -1,36 +0,0 @@
/**
* Native CPU atomic.h implementation
*
* Copyright (C) 2013 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
*
* 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.
*
* @ingroup arch
* @{
* @file
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
* @}
*/
#include "atomic.h"
#include "irq.h"
#include "debug.h"
unsigned int atomic_set_return(unsigned int *val, unsigned int set)
{
unsigned int old_val;
unsigned int old_state;
DEBUG("atomic_set_return\n");
old_state = disableIRQ();
old_val = *val;
*val = set;
restoreIRQ(old_state);
return old_val;
}