051e84c4b4
This commit introduces the new `Component` interface in the form of the headers base/component.h and base/entrypoint.h. The os/server.h API has become merely a compatibilty wrapper and will eventually be removed. The same holds true for os/signal_rpc_dispatcher.h. The mechanism has moved to base/signal.h and is now called 'Signal_handler'. Since the patch shuffles headers around, please do a 'make clean' in the build directory. Issue #1832
35 lines
883 B
C
35 lines
883 B
C
/*
|
|
* \brief User-level task helpers (x86_32)
|
|
* \author Christian Helmuth
|
|
* \date 2016-01-22
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2016 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__SPEC__X86_32__INTERNAL__CALL_FUNC_H_
|
|
#define _INCLUDE__SPEC__X86_32__INTERNAL__CALL_FUNC_H_
|
|
|
|
/* Libc includes */
|
|
#include <setjmp.h> /* _setjmp() as we don't care about signal state */
|
|
|
|
|
|
/**
|
|
* Call function with a new stack
|
|
*/
|
|
[[noreturn]] inline void call_func(void *sp, void *func, void *arg)
|
|
{
|
|
asm volatile ("movl %2, 0(%0);"
|
|
"movl %1, -0x4(%0);"
|
|
"movl %0, %%esp;"
|
|
"call *-4(%%esp);"
|
|
: : "r" (sp), "r" (func), "r" (arg));
|
|
__builtin_unreachable();
|
|
}
|
|
|
|
#endif /* _INCLUDE__SPEC__X86_32__INTERNAL__CALL_FUNC_H_ */
|