[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 10/10] doc: add section about syscall shim layer
Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- doc/guides/developers-app.rst | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/doc/guides/developers-app.rst b/doc/guides/developers-app.rst index bbd3bbda..23389152 100644 --- a/doc/guides/developers-app.rst +++ b/doc/guides/developers-app.rst @@ -323,6 +323,42 @@ An example context of extra.ld: :: This will add the section .uk_fs_list after the .text +============================ +Syscall shim layer +============================ + +If you library provides a syscall, you need to inform Unikraft that it +can use your implementation. Add a line in you Makefile.uk: :: + + UK_PROVIDED_SYSCALLS-$(CONFIG_LIBYOURLIBNAME) += <syscall_name>-<number_of_arguments> + +Where `<number_of_arguments>` is how many arguments your syscall accepts. + +For example: :: + + UK_PROVIDED_SYSCALLS-$(CONFIG_LIBVFSCORE) += writev-3 + +.. note:: Please consult corresponding man page in order to keep API + matching to the equivalent linux syscall + +For the implementation of you syscall use the following template: + +.. code-block:: c + + UK_SYSCALL_DEFINE(syscall_name, arg1_type, arg1_name, arg2_type, arg2_name, ..) + { + do_cool_stuff(); + } + +For example: + +.. code-block:: c + + UK_SYSCALL_DEFINE(writev, unsigned long, fd, const struct iovec *, vec, + unsigned long, vlen) + { + pwritev(fd, vec, vlen, -1); + } ============================ Make Targets -- 2.19.2 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |