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.
This commit is contained in:
Ingo Weinhold
2013-11-05 21:40:43 +01:00
parent a05e0af507
commit a712cdd0b1
2 changed files with 15 additions and 7 deletions
+9
View File
@@ -56,6 +56,12 @@ typedef struct {
#define B_TERM_BEFORE_FUNCTION_NAME "terminate_before"
#define B_TERM_AFTER_FUNCTION_NAME "terminate_after"
#define B_APP_IMAGE_SYMBOL ((void*)(addr_t)0)
// value that can be used instead of a pointer to a symbol in the program
// image.
#define B_CURRENT_IMAGE_SYMBOL ((void*)&__haiku_init_before)
// pointer to a symbol in the callers image
// flags for _kern_load_image() (private API)
enum {
B_WAIT_TILL_LOADED = 0x01,
@@ -91,6 +97,9 @@ status_t _get_image_info(image_id image, image_info *info, size_t size);
status_t _get_next_image_info(team_id team, int32 *cookie, image_info *info,
size_t size);
/* private */
void __haiku_init_before(image_id id);
#ifdef __cplusplus
}
#endif