Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1264947

Re: [RFC PATCH 08/28] lkl: system call interface and application API

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 08/28] lkl: system call interface and application API
Date 2015-11-08 00:30 +0100
Message-ID <qsl5L-pn-9@gated-at.bofh.it> (permalink)
References <qqQnn-7AN-3@gated-at.bofh.it> <qqQno-7AN-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday 03 November 2015 22:20:39 Octavian Purdila wrote:
> +
> +/*
> + * Unsupported system calls due to lack of support in LKL (e.g. related to
> + * virtual memory, signal, user processes). We also only support 64bit version
> + * of system calls where we have two version to keep the same APi across 32 and
> + * 64 bit hosts.
> + */
> +#define __NR_restart_syscall 0
> +#define __NR_exit 0
> +#define __NR_fork 0
> +#define __NR_execve 0
> +#define __NR_ptrace 0
> +#define __NR_alarm 0
> +#define __NR_pause 0

Why are these not #undef?

> diff --git a/arch/lkl/include/uapi/asm/unistd.h b/arch/lkl/include/uapi/asm/unistd.h
> new file mode 100644
> index 0000000..68b5423
> --- /dev/null
> +++ b/arch/lkl/include/uapi/asm/unistd.h
> @@ -0,0 +1,256 @@
> +#ifndef _ASM_UAPI_LKL_UNISTD_H
> +#define _ASM_UAPI_LKL_UNISTD_H
> +
> +#ifdef __KERNEL__
> +#define __NR_ni_syscall		0
> +#define __NR_reboot		1
> +#endif
> +#define __NR_getpid		2
> +#define __NR_write		3
> +#define __NR_close		4
> +#define __NR_unlink		5
> +#define __NR_open		6
> +#define __NR_poll		7

Could you use the standard numbers from include/uapi/asm-generic/unistd.h?
Maybe include that header and then #undef the ones you don't support?
That would avoid having to assign a new number of each future syscall
that gets added.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 08/28] lkl: system call interface and application API Octavian Purdila <octavian.purdila@intel.com> - 2015-11-03 21:30 +0100
  Re: [RFC PATCH 08/28] lkl: system call interface and application API Arnd Bergmann <arnd@arndb.de> - 2015-11-08 00:30 +0100
    Re: [RFC PATCH 08/28] lkl: system call interface and application API Octavian Purdila <octavian.purdila@intel.com> - 2015-11-08 04:50 +0100
      Re: [RFC PATCH 08/28] lkl: system call interface and application API Arnd Bergmann <arnd@arndb.de> - 2015-11-08 11:30 +0100

csiph-web