zephyr/tests/kernel/mem_protect/syscalls/src/test_syscalls.h
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00

33 lines
795 B
C

/*
* Copyright (c) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _TEST_SYSCALLS_H_
#define _TEST_SYSCALLS_H_
#include <zephyr/kernel.h>
__syscall int string_alloc_copy(char *src);
__syscall int string_copy(char *src);
__syscall int to_copy(char *dest);
__syscall size_t string_nlen(char *src, size_t maxlen, int *err);
__syscall int syscall_arg64(uint64_t arg);
__syscall uint64_t syscall_arg64_big(uint32_t arg1, uint32_t arg2, uint64_t arg3,
uint32_t arg4, uint32_t arg5, uint64_t arg6);
__syscall bool syscall_context(void);
__syscall uint32_t more_args(uint32_t arg1, uint32_t arg2, uint32_t arg3,
uint32_t arg4, uint32_t arg5, uint32_t arg6,
uint32_t arg7);
#include <syscalls/test_syscalls.h>
#endif /* _TEST_SYSCALLS_H_ */