mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 22:47:50 +00:00
ca971bbfd8
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082
34 lines
854 B
C++
34 lines
854 B
C++
/*
|
|
* \brief Atomic operations for ARM on codezero
|
|
* \author Norman Feske
|
|
* \date 2009-10-02
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2009-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__ARM__CPU__ATOMIC_H_
|
|
#define _INCLUDE__ARM__CPU__ATOMIC_H_
|
|
|
|
namespace Genode {
|
|
|
|
/**
|
|
* Atomic compare and exchange
|
|
*
|
|
* This function compares the value at dest with cmp_val.
|
|
* If both values are equal, dest is set to new_val. If
|
|
* both values are different, the value at dest remains
|
|
* unchanged.
|
|
*
|
|
* \return 1 if the value was successfully changed to new_val,
|
|
* 0 if cmp_val and the value at dest differ.
|
|
*/
|
|
int cmpxchg(volatile int *dest, int cmp_val, int new_val);
|
|
}
|
|
|
|
#endif /* _INCLUDE__ARM__CPU__ATOMIC_H_ */
|