mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
libc: remove legacy kernel functions
This commit is contained in:
parent
ab953a534c
commit
0605180a61
@ -17,7 +17,7 @@ SRC_CC = atexit.cc dummies.cc rlimit.cc sysctl.cc \
|
||||
plugin.cc plugin_registry.cc select.cc exit.cc environ.cc sleep.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 \
|
||||
socket_operations.cc socket_fs_plugin.cc syscall.cc \
|
||||
getpwent.cc getrandom.cc fork.cc execve.cc kernel.cc component.cc \
|
||||
genode.cc
|
||||
|
||||
|
@ -16,7 +16,6 @@ include:
|
||||
cp -r $(PORT_DIR)/include/* $@/
|
||||
cp -r $(REP_DIR)/include/libc $@/
|
||||
cp -r $(REP_DIR)/include/libc-genode $@/
|
||||
cp $(REP_DIR)/src/lib/libc/internal/legacy.h $@/libc/
|
||||
|
||||
content: lib/mk/ldso_so_support.mk src/lib/ldso/so_support.c
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
/* libc-internal includes */
|
||||
#include <internal/init.h>
|
||||
#include <internal/clone_session.h>
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/kernel_routine.h>
|
||||
#include <internal/suspend.h>
|
||||
#include <internal/resume.h>
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
/* libc-local includes */
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/errno.h>
|
||||
#include <internal/init.h>
|
||||
|
||||
|
@ -502,22 +502,6 @@ struct Libc::Kernel final : Vfs::Io_response_handler,
|
||||
: _pthreads.suspend_myself(check, timeout_ms);
|
||||
}
|
||||
|
||||
void dispatch_pending_io_signals()
|
||||
{
|
||||
if (!_main_context()) return;
|
||||
|
||||
if (!_setjmp(_user_context)) {
|
||||
_valid_user_context = true;
|
||||
_dispatch_pending_io_signals = true;
|
||||
_resume_main_once = true; /* afterwards resume main */
|
||||
_switch_to_kernel();
|
||||
} else {
|
||||
_valid_user_context = false;
|
||||
_dispatch_pending_io_signals = false;
|
||||
_signal.execute_signal_handlers();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Monitor interface
|
||||
*/
|
||||
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* \brief Globally available accessors to Libc kernel functionality
|
||||
* \author Norman Feske
|
||||
* \date 2019-09-18
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016-2019 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 _LIBC__INTERNAL__LEGACY_H_
|
||||
#define _LIBC__INTERNAL__LEGACY_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <vfs/vfs_handle.h> /* needed for 'watch' */
|
||||
|
||||
/* libc-internal includes */
|
||||
#include <internal/types.h>
|
||||
|
||||
namespace Libc {
|
||||
|
||||
/*
|
||||
* XXX called only by 'Libc::Vfs_plugin::read'
|
||||
*/
|
||||
void dispatch_pending_io_signals();
|
||||
}
|
||||
|
||||
#endif /* _LIBC__INTERNAL__LEGACY_H_ */
|
@ -16,7 +16,6 @@
|
||||
#define _LIBC__INTERNAL__PTHREAD_POOL_H_
|
||||
|
||||
/* libc-internal includes */
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/suspend.h>
|
||||
|
||||
namespace Libc { class Pthread_pool; }
|
||||
|
@ -1,26 +0,0 @@
|
||||
/*
|
||||
* \brief Globally available accessors to Libc kernel functionality
|
||||
* \author Norman Feske
|
||||
* \date 2019-09-18
|
||||
*
|
||||
* XXX eliminate the need for these functions, or
|
||||
* turn them into regular members of 'Libc::Kernel'
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
|
||||
/* libc-internal includes */
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/kernel.h>
|
||||
|
||||
|
||||
void Libc::dispatch_pending_io_signals()
|
||||
{
|
||||
Kernel::kernel().dispatch_pending_io_signals();
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
/* libc-internal includes */
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/errno.h>
|
||||
#include <internal/init.h>
|
||||
#include <internal/current_time.h>
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include <internal/mem_alloc.h>
|
||||
#include <internal/errno.h>
|
||||
#include <internal/init.h>
|
||||
#include <internal/legacy.h>
|
||||
#include <internal/monitor.h>
|
||||
#include <internal/current_time.h>
|
||||
|
||||
@ -951,9 +950,6 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf,
|
||||
ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf,
|
||||
::size_t count)
|
||||
{
|
||||
/* TODO why is this required? */
|
||||
dispatch_pending_io_signals();
|
||||
|
||||
if ((fd->flags & O_ACCMODE) == O_WRONLY) {
|
||||
return Errno(EBADF);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user