Closed sgerbino closed 4 years ago
As a blockchain developer, I would like to override system calls via in-band updates.
upload_kernel_module
init
register_syscall
unregister_syscall
Register system call may look like this:
register_syscall( SYSCALL_PRINT, N("action") );
An example kernel module:
namespace koinos::kernel { class module { void init() = 0; }; } class my_module : public koinos::kernel::module { void init() { register_syscall( SYSCALL_PRINT, N("print") ); } [[koinos::action]] void print( std::string s ) { _print( s ); } }
This design has been usurped. Closing.
As a blockchain developer, I would like to override system calls via in-band updates.
upload_kernel_module
operation, this operation should call theinit
function of the kernel module.register_syscall
, ensuring the syscall table is only modified at the end of a block.unregister_syscall
, ensuring the syscall table is only modified at the end of a block.Register system call may look like this:
An example kernel module: