mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +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
36 lines
706 B
C++
36 lines
706 B
C++
/*
|
|
* \brief Memory touch helpers
|
|
* \author Norman Feske
|
|
* \date 2007-04-29
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2007-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__UTIL__TOUCH_H_
|
|
#define _INCLUDE__UTIL__TOUCH_H_
|
|
|
|
#include <base/printf.h>
|
|
|
|
namespace Genode {
|
|
|
|
/** Touch one byte at address read only */
|
|
inline void touch_read(unsigned char const volatile *addr)
|
|
{
|
|
(void)*addr;
|
|
}
|
|
|
|
/** Touch one byte at address read/write */
|
|
inline void touch_read_write(unsigned char volatile *addr)
|
|
{
|
|
unsigned char v = *addr;
|
|
*addr = v;
|
|
}
|
|
}
|
|
|
|
#endif /* _INCLUDE__UTIL__TOUCH_H_ */
|