mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
c31adb77e7
Issue #5217
25 lines
560 B
C++
25 lines
560 B
C++
/*
|
|
* \brief Helper for flushing cache lines
|
|
* \author Johannes Schlatow
|
|
* \date 2023-09-20
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2023 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__SPEC__X86_64__CLFLUSH_H_
|
|
#define _INCLUDE__SPEC__X86_64__CLFLUSH_H_
|
|
|
|
namespace Genode {
|
|
inline void clflush(volatile void *addr)
|
|
{
|
|
asm volatile("clflush %0" : "+m" (*(volatile char *)addr));
|
|
}
|
|
}
|
|
|
|
#endif /* _INCLUDE__SPEC__X86_64__CLFLUSH_H_ */
|