Commit 3570408d authored by Yong Cong Sin's avatar Yong Cong Sin Committed by Henrik Brix Andersen
Browse files

build: namespace syscall sources to `zephyr/`



Namespace the `syscall_dispatch.c` & `syscall_export_llext.c`
to `zephyr/` as well

Signed-off-by: default avatarYong Cong Sin <ycsin@meta.com>
parent 0dac6c13
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -801,15 +801,15 @@ if(CONFIG_LEGACY_GENERATED_INCLUDE_PATH)
    ${CMAKE_CURRENT_BINARY_DIR}/include/generated/syscall_list.h)
endif()

add_custom_command(OUTPUT include/generated/syscall_dispatch.c ${syscall_list_h}
add_custom_command(OUTPUT include/generated/zephyr/syscall_dispatch.c ${syscall_list_h}
  # Also, some files are written to include/generated/zephyr/syscalls/
  COMMAND
  ${PYTHON_EXECUTABLE}
  ${ZEPHYR_BASE}/scripts/build/gen_syscalls.py
  --json-file        ${syscalls_json}                     # Read this file
  --base-output      include/generated/zephyr/syscalls    # Write to this dir
  --syscall-dispatch include/generated/syscall_dispatch.c # Write this file
  --syscall-export-llext  include/generated/syscall_export_llext.c
  --syscall-dispatch include/generated/zephyr/syscall_dispatch.c # Write this file
  --syscall-export-llext  include/generated/zephyr/syscall_export_llext.c
  --syscall-list     ${syscall_list_h}
  $<$<BOOL:${CONFIG_USERSPACE}>:--gen-mrsh-files>
  ${SYSCALL_LONG_REGISTERS_ARG}
@@ -2121,7 +2121,7 @@ add_custom_command(
        ${ZEPHYR_BASE}/scripts/build/gen_syscalls.py
        --json-file        ${syscalls_json}                     # Read this file
        --base-output      edk/include/generated/zephyr/syscalls           # Write to this dir
        --syscall-dispatch edk/include/generated/syscall_dispatch.c # Write this file
        --syscall-dispatch edk/include/generated/zephyr/syscall_dispatch.c # Write this file
        --syscall-list     ${edk_syscall_list_h}
        $<$<BOOL:${CONFIG_LLEXT_EDK_USERSPACE_ONLY}>:--userspace-only>
        ${SYSCALL_LONG_REGISTERS_ARG}
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ the project out directory under ``include/generated/``:
  of the API in uppercase, prefixed with ``K_SYSCALL_``.

* An entry for the system call is created in the dispatch table
  ``_k_syscall_table``, expressed in ``include/generated/syscall_dispatch.c``
  ``_k_syscall_table``, expressed in ``include/generated/zephyr/syscall_dispatch.c``

  * This table only contains syscalls where their corresponding
    prototypes are declared in header files when
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ Build System
     * - ``version.h``
     * - ``zsr.h``

  and syscall headers are now namespaced into the ``zephyr/`` folder. The change is largely
  as well as syscall headers & sources are now namespaced into the ``zephyr/`` folder. The change is largely
  automated, and the script can be found in :github:`63973`.
  For the time being, the compatibility Kconfig (:kconfig:option:`CONFIG_LEGACY_GENERATED_INCLUDE_PATH`)
  is enabled by default so that downstream applications will continue to compile, a warning message
+1 −1
Original line number Diff line number Diff line
@@ -1014,4 +1014,4 @@ static uintptr_t handler_no_syscall(uintptr_t arg1, uintptr_t arg2,
	CODE_UNREACHABLE; /* LCOV_EXCL_LINE */
}

#include <syscall_dispatch.c>
#include <zephyr/syscall_dispatch.c>
+1 −1
Original line number Diff line number Diff line
@@ -16,4 +16,4 @@ EXPORT_SYMBOL(memcmp);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memset);

#include <syscall_export_llext.c>
#include <zephyr/syscall_export_llext.c>