History log of /haiku/headers/os/kernel/image.h
Revision Date Author Comments
# 05709fe3 15-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

headers: Fix B_CURRENT_IMAGE_SYMBOL for GCC2.

Apparently GCC2 does not like &__func__, so just drop the &.
Fixes #17253.


# 3493fcb6 02-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

headers/kernel: Add argument names to initialization functions.


# c5e4e4ff 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

headers/kernel: Include declarations of initialization functions in image.h.

No "real" functional change, but this causes GCC7 to throw errors when
these functions are declared without the image_id argument, which
in some files they were (as this commit repairs.)

This change is largely inconsequential on x86, but on callee-cleanup-args
targets, leaving out the argument would probably cause stack corruption.


# d545ad17 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

headers/kernel: Define B_CURRENT_IMAGE_SYMBOL via __func__.

Previously, __haiku_init_before was a symbol that was included in
each (shared) object, and so it could be used to determine what
one we were in. Now, there are no such universal symbols that
are declared private to only the object, so we have to use
a different approach.

__func__ is defined as a const char* at the very beginning of
every function it's used in, set to a string of the function name
only, i.e., the arguments and return type are left off. So while
including that is perhaps not quite optimal, in practice this
definition is used extremely rarely (it was introduced by Haiku,
and it is used in only 2 applications at all that I could find --
WebKit and Canna.)

There really isn't any other way to get a pointer that we know
for certain is within the current object besides this one
without inserting one, but that really isn't merited just for this.
(__builtin_return_address() has problematic semantics wrt. inlining,
including linker-inlining.) So this will have to do.


# 47517233 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

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.


# 04b9fbfd 01-Feb-2019 Augustin Cavalier <waddlesplash@gmail.com>

headers/kernel: Clean up image.h.

* Add missing whitespace.
* Remove definition of the now-gone __haiku_init_before.

No functional change intended.


# 97dfeb96 27-Mar-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Make some headers C89 safe again

- Allows to use FindDirectory.h in C89 sourcecode (no C++ style comments
allowed)


# a712cdd0 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

image.h: Add B_{APP,CURRENT}_IMAGE_SYMBOL macros

* Those can be used in cases where a pointer to an image symbol is
required.
* Adjust BResources::SetToImage() accordingly.


# e628f41c 13-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593ee7bb 12-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Extended image_info by fields for the Haiku version and ABI. The runtime loader
and the kernel read those values from the shared object (if available). In the
runtime loader this should eventually replace the gcc version guessing method
currently used (at least for shared objects built for Haiku). The optional
packages need to be rebuilt first, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c8a89db9 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Rewrote image.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6e4cbb9 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a28130b 12-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added (currently only) flag B_WAIT_TILL_LOADED for _kern_load_image()
(maybe this should better go into a private header?). If given the function
waits till the loader is done with loading and relocating the executable.
Otherwise it returns before the loader starts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11690 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6cdae891 12-Jan-2003 Axel Dörfler <axeld@pinc-software.de>

minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c321cf49 04-Oct-2002 Axel Dörfler <axeld@pinc-software.de>

Completed, rearranged, and cleaned up OS.h. Moved some typedefs from ktypes.h
to this place. Also removed create_sem_etc() from there, that shouldn't be a public call.
Cleaned up image.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53ae93e6 19-Sep-2002 Philippe Houdoin <philippe.houdoin@gmail.com>

Source compatibility objective: time to add some BeOS specific public headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a712cdd0b1900b330057a630165855a9d971ab41 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

image.h: Add B_{APP,CURRENT}_IMAGE_SYMBOL macros

* Those can be used in cases where a pointer to an image symbol is
required.
* Adjust BResources::SetToImage() accordingly.


# e628f41c49fb9788f6753888fd9421696d448e05 13-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593ee7bbc334e3ca6ecf6553543ad8037bd7b58a 12-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Extended image_info by fields for the Haiku version and ABI. The runtime loader
and the kernel read those values from the shared object (if available). In the
runtime loader this should eventually replace the gcc version guessing method
currently used (at least for shared objects built for Haiku). The optional
packages need to be rebuilt first, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c8a89db93e3a30f288aa8d15abf21ca0af2c9742 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

Rewrote image.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f6e4cbb95290a74b33d012600438b84742b0e572 15-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a28130b32a0f7f6d2bc77bf3fd4c7c15c63912b 12-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added (currently only) flag B_WAIT_TILL_LOADED for _kern_load_image()
(maybe this should better go into a private header?). If given the function
waits till the loader is done with loading and relocating the executable.
Otherwise it returns before the loader starts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11690 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6cdae891c3e5745d1954eafda2edeccf4e77bb84 12-Jan-2003 Axel Dörfler <axeld@pinc-software.de>

minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2417 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c321cf4929d844b706ca63251cf05d1af86844df 04-Oct-2002 Axel Dörfler <axeld@pinc-software.de>

Completed, rearranged, and cleaned up OS.h. Moved some typedefs from ktypes.h
to this place. Also removed create_sem_etc() from there, that shouldn't be a public call.
Cleaned up image.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 53ae93e6d5299d364a2c2361877691fa3e813c80 19-Sep-2002 Philippe Houdoin <philippe.houdoin@gmail.com>

Source compatibility objective: time to add some BeOS specific public headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1091 a95241bf-73f2-0310-859d-f6bbb57e9c96