From 475172337b217fc506feeec8d9fd8258c2d7c97c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 1 Feb 2019 19:45:56 -0500 Subject: [PATCH] headers/kernel: Move B_WAIT_TILL_LOADED to a syscall header. It is only used as an argument to _kern_load_image directly, not to any of the load_image functions in image.h, so it belongs in a syscall- specific header like other such constants. No functional change intended. --- headers/os/kernel/image.h | 15 ++------------- headers/private/system/syscall_load_image.h | 19 +++++++++++++++++++ src/bin/debug/debug_utils.cpp | 1 + src/kits/debug/TeamDebugger.cpp | 1 + src/kits/tracker/FSUtils.cpp | 1 + src/system/kernel/team.cpp | 1 + src/system/libroot/os/image.cpp | 1 + 7 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 headers/private/system/syscall_load_image.h diff --git a/headers/os/kernel/image.h b/headers/os/kernel/image.h index 3bef07cba9..8a712c8a74 100644 --- a/headers/os/kernel/image.h +++ b/headers/os/kernel/image.h @@ -1,6 +1,6 @@ /* - * Copyright 2007-2019, Haiku, Inc. All Rights Reserved. - * Distributed under the terms of the MIT license. + * Copyright 2007-2019, Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. */ #ifndef _IMAGE_H #define _IMAGE_H @@ -67,17 +67,6 @@ typedef struct { /* pointer to a symbol in the callers image */ -/* flags for _kern_load_image() (private API) */ -enum { - B_WAIT_TILL_LOADED = 0x01, - /* Wait till the loader has loaded and relocated (but not yet - initialized) the application image and all dependencies. If not - supplied, the function returns before the loader started to do - anything at all, i.e. it returns success, even if the executable - doesn't exist. */ -}; - - #ifdef __cplusplus extern "C" { #endif diff --git a/headers/private/system/syscall_load_image.h b/headers/private/system/syscall_load_image.h new file mode 100644 index 0000000000..b9c862a6c7 --- /dev/null +++ b/headers/private/system/syscall_load_image.h @@ -0,0 +1,19 @@ +/* + * Copyright 2019, Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _SYSTEM_SYSCALL_LOAD_IMAGE_H +#define _SYSTEM_SYSCALL_LOAD_IMAGE_H + + +enum { + B_WAIT_TILL_LOADED = 0x01, + /* Wait till the loader has loaded and relocated (but not yet + initialized) the application image and all dependencies. If not + supplied, the function returns before the loader started to do + anything at all, i.e. it returns success, even if the executable + doesn't exist. */ +}; + + +#endif /* _SYSTEM_SYSCALL_LOAD_IMAGE_H */ diff --git a/src/bin/debug/debug_utils.cpp b/src/bin/debug/debug_utils.cpp index 4bfc361297..a40da76ebc 100644 --- a/src/bin/debug/debug_utils.cpp +++ b/src/bin/debug/debug_utils.cpp @@ -17,6 +17,7 @@ #include #include +#include extern const char* __progname; diff --git a/src/kits/debug/TeamDebugger.cpp b/src/kits/debug/TeamDebugger.cpp index eb0abe65e9..0933412f0c 100644 --- a/src/kits/debug/TeamDebugger.cpp +++ b/src/kits/debug/TeamDebugger.cpp @@ -17,6 +17,7 @@ #include #include +#include BTeamDebugger::BTeamDebugger() diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp index b2bd4c6933..19dbe280d9 100644 --- a/src/kits/tracker/FSUtils.cpp +++ b/src/kits/tracker/FSUtils.cpp @@ -75,6 +75,7 @@ respective holders. All rights reserved. #include #include #include +#include #include "Attributes.h" #include "Bitmaps.h" diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index ae60bd016f..3a1f918403 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include diff --git a/src/system/libroot/os/image.cpp b/src/system/libroot/os/image.cpp index b59a6d4117..8edba44348 100644 --- a/src/system/libroot/os/image.cpp +++ b/src/system/libroot/os/image.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include