libc: add wrapper function for 'Genode::cache_coherent()'

Fixes #3858
This commit is contained in:
Christian Prochaska 2020-08-20 20:06:16 +02:00 committed by Norman Feske
parent 9bc6b8be5a
commit 9ec2a19cc0
4 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,30 @@
/*
* \brief POSIX wrappers for important base lib features
* \author Christian Prochaska
* \date 2020-07-06
*/
/*
* Copyright (C) 2020 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__LIBC__GENODE_H_
#define _INCLUDE__LIBC__GENODE_H_
/* libc includes */
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void genode_cache_coherent(void *addr, size_t size);
#ifdef __cplusplus
}
#endif
#endif /* _INCLUDE__LIBC__GENODE_H_ */

View File

@ -18,7 +18,8 @@ SRC_CC = atexit.cc dummies.cc rlimit.cc sysctl.cc \
pread_pwrite.cc readv_writev.cc poll.cc \
vfs_plugin.cc dynamic_linker.cc signal.cc \
socket_operations.cc socket_fs_plugin.cc syscall.cc legacy.cc \
getpwent.cc getrandom.cc fork.cc execve.cc kernel.cc component.cc
getpwent.cc getrandom.cc fork.cc execve.cc kernel.cc component.cc \
genode.cc
#
# Pthreads

View File

@ -237,6 +237,7 @@ fwprintf T
fwrite T
fwscanf T
gai_strerror T
genode_cache_coherent T
getaddrinfo T
getbootfile T
getbsize T

View File

@ -0,0 +1,23 @@
/*
* \brief POSIX wrappers for important base lib features
* \author Christian Prochaska
* \date 2020-07-06
*/
/*
* Copyright (C) 2020 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.
*/
/* Genode includes */
#include <cpu/cache.h>
/* libc includes */
#include <libc/genode.h>
void genode_cache_coherent(void *addr, size_t size)
{
Genode::cache_coherent((Genode::addr_t)addr, size);
}