libc: make libc-plugin headers private to libc

Fixes #4904
This commit is contained in:
Norman Feske 2023-05-03 14:01:06 +02:00 committed by Christian Helmuth
parent e1e26c4439
commit 823349fffb
23 changed files with 44 additions and 145 deletions

View File

@ -983,95 +983,6 @@ _ZN4Libc14pthread_createEPP7pthreadPKP12pthread_attrPFPvS7_ES7_PKc T
_ZN4Libc26pthread_create_from_threadEPP7pthreadRN6Genode6ThreadEPv T
_ZN4Libc27pthread_create_from_sessionEPP7pthreadPFPvS3_ES3_mPKcPN6Genode11Cpu_sessionENS8_8Affinity8LocationE T
#
# Libc plugin interface
#
_ZN4Libc25File_descriptor_allocator15find_by_libc_fdEi T
_ZN4Libc25File_descriptor_allocator4freeEPNS_15File_descriptorE T
_ZN4Libc25File_descriptor_allocator5allocEPNS_6PluginEPNS_14Plugin_contextEi T
_ZN4Libc25file_descriptor_allocatorEv T
_ZN4Libc6Plugin10getsockoptEPNS_15File_descriptorEiiPvPj T
_ZN4Libc6Plugin10setsockoptEPNS_15File_descriptorEiiPKvj T
_ZN4Libc6Plugin11getpeernameEPNS_15File_descriptorEP8sockaddrPj T
_ZN4Libc6Plugin11getsocknameEPNS_15File_descriptorEP8sockaddrPj T
_ZN4Libc6Plugin13getdirentriesEPNS_15File_descriptorEPcmPx T
_ZN4Libc6Plugin13getdirentriesEPNS_15File_descriptorEPcmPl T
_ZN4Libc6Plugin13supports_mmapEv T
_ZN4Libc6Plugin13supports_openEPKci T
_ZN4Libc6Plugin13supports_pipeEv T
_ZN4Libc6Plugin13supports_pollEv T
_ZN4Libc6Plugin13supports_statEPKc T
_ZN4Libc6Plugin14supports_mkdirEPKct T
_ZN4Libc6Plugin14supports_rmdirEPKc T
_ZN4Libc6Plugin15supports_accessEPKci T
_ZN4Libc6Plugin15supports_execveEPKcPKPcS5_ T
_ZN4Libc6Plugin15supports_renameEPKcS2_ T
_ZN4Libc6Plugin15supports_selectEiP6fd_setS2_S2_P7timeval T
_ZN4Libc6Plugin15supports_socketEiii T
_ZN4Libc6Plugin15supports_unlinkEPKc T
_ZN4Libc6Plugin16supports_symlinkEPKcS2_ T
_ZN4Libc6Plugin17supports_readlinkEPKcPcj T
_ZN4Libc6Plugin17supports_readlinkEPKcPcm T
_ZN4Libc6Plugin3dupEPNS_15File_descriptorE T
_ZN4Libc6Plugin4bindEPNS_15File_descriptorEPK8sockaddrj T
_ZN4Libc6Plugin4dup2EPNS_15File_descriptorES2_ T
_ZN4Libc6Plugin4mmapEPvmiiPNS_15File_descriptorEx T
_ZN4Libc6Plugin4mmapEPvmiiPNS_15File_descriptorEl T
_ZN4Libc6Plugin4openEPKci T
_ZN4Libc6Plugin4pipeEPPNS_15File_descriptorE T
_ZN4Libc6Plugin4pollERNS_15File_descriptorER6pollfd T
_ZN4Libc6Plugin4readEPNS_15File_descriptorEPvj T
_ZN4Libc6Plugin4readEPNS_15File_descriptorEPvm T
_ZN4Libc6Plugin4recvEPNS_15File_descriptorEPvji T
_ZN4Libc6Plugin4recvEPNS_15File_descriptorEPvmi T
_ZN4Libc6Plugin4sendEPNS_15File_descriptorEPKvji T
_ZN4Libc6Plugin4sendEPNS_15File_descriptorEPKvmi T
_ZN4Libc6Plugin4statEPKcP4stat T
_ZN4Libc6Plugin5closeEPNS_15File_descriptorE T
_ZN4Libc6Plugin5fcntlEPNS_15File_descriptorEil T
_ZN4Libc6Plugin5fstatEPNS_15File_descriptorEP4stat T
_ZN4Libc6Plugin5fsyncEPNS_15File_descriptorE T
_ZN4Libc6Plugin5ioctlEPNS_15File_descriptorEmPc T
_ZN4Libc6Plugin5lseekEPNS_15File_descriptorEli T
_ZN4Libc6Plugin5lseekEPNS_15File_descriptorExi T
_ZN4Libc6Plugin5mkdirEPKct T
_ZN4Libc6Plugin5msyncEPvmi T
_ZN4Libc6Plugin5rmdirEPKc T
_ZN4Libc6Plugin5writeEPNS_15File_descriptorEPKvj T
_ZN4Libc6Plugin5writeEPNS_15File_descriptorEPKvm T
_ZN4Libc6Plugin6acceptEPNS_15File_descriptorEP8sockaddrPj T
_ZN4Libc6Plugin6accessEPKci T
_ZN4Libc6Plugin6execveEPKcPKPcS5_ T
_ZN4Libc6Plugin6listenEPNS_15File_descriptorEi T
_ZN4Libc6Plugin6munmapEPvj T
_ZN4Libc6Plugin6munmapEPvm T
_ZN4Libc6Plugin6renameEPKcS2_ T
_ZN4Libc6Plugin6selectEiP6fd_setS2_S2_P7timeval T
_ZN4Libc6Plugin6sendtoEPNS_15File_descriptorEPKvjiPK8sockaddrj T
_ZN4Libc6Plugin6sendtoEPNS_15File_descriptorEPKvmiPK8sockaddrj T
_ZN4Libc6Plugin6socketEiii T
_ZN4Libc6Plugin6unlinkEPKc T
_ZN4Libc6Plugin7connectEPNS_15File_descriptorEPK8sockaddrj T
_ZN4Libc6Plugin7fstatfsEPNS_15File_descriptorEP6statfs T
_ZN4Libc6Plugin7recvmsgEPNS_15File_descriptorEP6msghdri T
_ZN4Libc6Plugin7symlinkEPKcS2_ T
_ZN4Libc6Plugin8priorityEv T
_ZN4Libc6Plugin8readlinkEPKcPcj T
_ZN4Libc6Plugin8readlinkEPKcPcm T
_ZN4Libc6Plugin8recvfromEPNS_15File_descriptorEPvjiP8sockaddrPj T
_ZN4Libc6Plugin8recvfromEPNS_15File_descriptorEPvmiP8sockaddrPj T
_ZN4Libc6Plugin8shutdownEPNS_15File_descriptorEi T
_ZN4Libc6Plugin9ftruncateEPNS_15File_descriptorEl T
_ZN4Libc6Plugin9ftruncateEPNS_15File_descriptorEx T
_ZN4Libc6Plugin10resume_allEv T
_ZN4Libc6PluginC1Ei T
_ZN4Libc6PluginC2Ei T
_ZN4Libc6PluginD0Ev T
_ZN4Libc6PluginD1Ev T
_ZN4Libc6PluginD2Ev T
_ZN4Libc9mem_allocEv T
_ZTIN4Libc6PluginE D 40
#
# C++ runtime (implemented in ld.lib.so which is not linked directly to libc components)
#

View File

@ -1,4 +1,4 @@
content: include/libc-plugin src/lib/libc lib/mk LICENSE
content: src/lib/libc lib/mk LICENSE
LIBC_PORT_DIR := $(call port_dir,$(REP_DIR)/ports/libc)
LIBM_PORT_DIR := $(LIBC_PORT_DIR)
@ -8,9 +8,6 @@ src/lib/libc:
cp -r $(LIBC_PORT_DIR)/src/lib/libc/* $@
cp -r $(REP_DIR)/src/lib/libc/* $@
include/libc-plugin:
$(mirror_from_rep_dir)
lib/mk:
mkdir -p $@
cp $(addprefix $(REP_DIR)/$@/,libc.mk libc-* libm.inc) $@

View File

@ -15,13 +15,11 @@
/* Genode includes */
#include <base/component.h>
/* libc includes */
#include <libc-plugin/plugin_registry.h>
/* base-internal includes */
#include <base/internal/unmanaged_singleton.h>
/* libc-internal includes */
#include <internal/plugin_registry.h>
#include <internal/kernel.h>

View File

@ -23,9 +23,9 @@
#include <string.h>
#include <stdio.h>
#include <libc/allocator.h>
#include <libc-plugin/fd_alloc.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
#include <internal/call_func.h>
#include <internal/init.h>
#include <internal/errno.h>

View File

@ -20,14 +20,12 @@
/* Genode-internal includes */
#include <base/internal/unmanaged_singleton.h>
/* libc plugin interface */
#include <libc-plugin/fd_alloc.h>
/* libc includes */
#include <fcntl.h>
#include <unistd.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
#include <internal/init.h>
using namespace Libc;

View File

@ -19,10 +19,6 @@
#include <os/path.h>
#include <util/token.h>
/* Genode-specific libc interfaces */
#include <libc-plugin/plugin_registry.h>
#include <libc-plugin/plugin.h>
/* compiler includes */
#include <stdarg.h>
@ -42,6 +38,8 @@ extern "C" {
}
/* libc-internal includes */
#include <internal/plugin_registry.h>
#include <internal/plugin.h>
#include <internal/file.h>
#include <internal/mem_alloc.h>
#include <internal/mmap_registry.h>

View File

@ -28,9 +28,9 @@
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <libc-plugin/fd_alloc.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
#include <internal/init.h>
#include <internal/clone_session.h>
#include <internal/monitor.h>

View File

@ -16,7 +16,7 @@
/* libc-internal includes */
#include <internal/types.h>
#include <libc-plugin/plugin.h>
#include <internal/plugin.h>
namespace Libc {

View File

@ -2,7 +2,6 @@
* \brief file descriptor allocator interface
* \author Christian Prochaska
* \date 2010-01-21
*
*/
/*
@ -28,7 +27,8 @@
#include <stdlib.h>
#include <string.h>
#include <libc-plugin/plugin.h>
/* libc-internal includes */
#include <internal/plugin.h>
enum { MAX_NUM_FDS = 1024 };

View File

@ -18,9 +18,9 @@
/* Genode includes */
#include <base/log.h>
/* Genode-specific libc interfaces */
#include <libc-plugin/fd_alloc.h>
#include <libc-plugin/plugin_registry.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
#include <internal/plugin_registry.h>
enum { INVALID_FD = -1 };

View File

@ -19,9 +19,9 @@
/* libc includes */
#include <limits.h> /* for 'PATH_MAX' */
#include <libc-plugin/plugin.h>
/* libc-internal includes */
#include <internal/plugin.h>
#include <internal/types.h>
namespace Libc {

View File

@ -22,9 +22,9 @@
/* libc includes */
#include <errno.h>
#include <libc-plugin/plugin.h>
/* libc-internal includes */
#include <internal/plugin.h>
#include <internal/types.h>
namespace Libc {

View File

@ -11,8 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _LIBC_PLUGIN__PLUGIN_H_
#define _LIBC_PLUGIN__PLUGIN_H_
#ifndef _LIBC__INTERNAL__PLUGIN_H_
#define _LIBC__INTERNAL__PLUGIN_H_
#include <os/path.h>
#include <base/exception.h>
@ -148,4 +148,4 @@ namespace Libc {
};
}
#endif /* _LIBC_PLUGIN__PLUGIN_H_ */
#endif /* _LIBC__INTERNAL__PLUGIN_H_ */

View File

@ -2,7 +2,6 @@
* \brief plugin registry interface
* \author Christian Prochaska
* \date 2010-01-21
*
*/
/*
@ -12,12 +11,14 @@
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _LIBC_PLUGIN__PLUGIN_REGISTRY_H_
#define _LIBC_PLUGIN__PLUGIN_REGISTRY_H_
#ifndef _LIBC__INTERNAL__PLUGIN_REGISTRY_H_
#define _LIBC__INTERNAL__PLUGIN_REGISTRY_H_
/* Genode includes */
#include <util/list.h>
#include <libc-plugin/plugin.h>
/* libc-internal includes */
#include <internal/plugin.h>
namespace Libc {
@ -51,4 +52,4 @@ struct Libc::Plugin_registry : List<Plugin>
}
};
#endif /* _LIBC_PLUGIN__PLUGIN_REGISTRY_H_ */
#endif /* _LIBC__INTERNAL__PLUGIN_REGISTRY_H_ */

View File

@ -25,14 +25,11 @@
#include <fcntl.h>
#include <unistd.h>
/* libc plugin interface */
#include <libc-plugin/plugin.h>
#include <libc-plugin/fd_alloc.h>
/* libc-internal includes */
#include <internal/plugin.h>
#include <internal/fd_alloc.h>
#include <internal/errno.h>
namespace Libc { class Vfs_plugin; }

View File

@ -14,12 +14,10 @@
/* Genode includes */
#include <base/log.h>
/* libc plugin interface */
#include <libc-plugin/fd_alloc.h>
#include <libc-plugin/plugin_registry.h>
#include <libc-plugin/plugin.h>
/* local includes */
#include <internal/fd_alloc.h>
#include <internal/plugin_registry.h>
#include <internal/plugin.h>
#include <internal/init.h>
#include <internal/resume.h>

View File

@ -11,7 +11,8 @@
* under the terms of the GNU Affero General Public License version 3.
*/
#include <libc-plugin/plugin_registry.h>
/* libc-internal includes */
#include <internal/plugin_registry.h>
namespace Libc {

View File

@ -14,11 +14,11 @@
*/
/* Libc includes */
#include <libc-plugin/plugin_registry.h>
#include <libc-plugin/plugin.h>
#include <sys/poll.h>
/* internal includes */
#include <internal/plugin_registry.h>
#include <internal/plugin.h>
#include <internal/errno.h>
#include <internal/file.h>
#include <internal/init.h>

View File

@ -13,7 +13,6 @@
/* Genode includes */
#include <base/mutex.h>
#include <libc-plugin/fd_alloc.h>
/* libc includes */
#include <sys/types.h>
@ -21,6 +20,7 @@
#include <unistd.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
#include <internal/types.h>

View File

@ -13,7 +13,6 @@
/* Genode includes */
#include <base/log.h>
#include <libc-plugin/fd_alloc.h>
/* libc includes */
#include <sys/limits.h>
@ -21,6 +20,10 @@
#include <sys/resource.h>
#include <stdio.h>
/* libc-internal includes */
#include <internal/fd_alloc.h>
extern "C" int __attribute__((weak)) getrlimit(int resource, struct rlimit *rlim)
{
/*

View File

@ -27,14 +27,14 @@
#include <util/reconstructible.h>
/* Libc includes */
#include <libc-plugin/plugin_registry.h>
#include <libc-plugin/plugin.h>
#include <libc/select.h>
#include <stdlib.h>
#include <sys/select.h>
#include <signal.h>
/* libc-internal includes */
#include <internal/plugin_registry.h>
#include <internal/plugin.h>
#include <internal/kernel.h>
#include <internal/init.h>
#include <internal/signal.h>

View File

@ -15,11 +15,8 @@
#include <util/string.h>
#include <base/env.h>
/* Genode-specific libc interfaces */
#include <libc-plugin/plugin.h>
#include <libc-plugin/fd_alloc.h>
/* libc includes */
#include <sys/types.h>
#include <sys/sysctl.h>
#include <errno.h>
#include <fcntl.h>
@ -27,6 +24,8 @@
#include <unistd.h>
/* libc-internal includes */
#include <internal/plugin.h>
#include <internal/fd_alloc.h>
#include <internal/errno.h>
#include <internal/init.h>

View File

@ -36,10 +36,8 @@
#include <net/if.h>
#include <net/if_tap.h>
/* libc plugin interface */
#include <libc-plugin/plugin.h>
/* libc-internal includes */
#include <internal/plugin.h>
#include <internal/kernel.h>
#include <internal/vfs_plugin.h>
#include <internal/mem_alloc.h>