* Cleared up a misconception in the notification mechanism. We already had
methods that used an "event mask" field. There was no need to introduce a "flags" field for the same purpose. * Renamed protected DefaultNotificationService methods (removed "_" prefix). * Adjusted the code providing a notification service accordingly. * Changed the event message several notification services generated by renaming the "opcode" field to "event". * Implemented the TEAM_ADDED event and also added a TEAM_EXEC event. * Added notifications for threads and images. * Added visitor-like iteration functions for teams, threads, and images. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30126 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5,12 +5,32 @@
|
||||
#ifndef _KERNEL_IMAGE_H
|
||||
#define _KERNEL_IMAGE_H
|
||||
|
||||
|
||||
#include <image.h>
|
||||
|
||||
|
||||
struct image;
|
||||
struct team;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <util/OpenHashTable.h>
|
||||
|
||||
struct image {
|
||||
struct image* next;
|
||||
struct image* prev;
|
||||
HashTableLink<image> hash_link;
|
||||
image_info info;
|
||||
team_id team;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
// image notifications
|
||||
#define IMAGE_MONITOR '_Im_'
|
||||
#define IMAGE_ADDED 0x01
|
||||
#define IMAGE_REMOVED 0x02
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -20,6 +40,10 @@ extern status_t unregister_image(struct team *team, image_id id);
|
||||
extern int32 count_images(struct team *team);
|
||||
extern status_t remove_images(struct team *team);
|
||||
|
||||
typedef bool (*image_iterator_callback)(struct image* image, void* cookie);
|
||||
struct image* image_iterate_through_images(image_iterator_callback callback,
|
||||
void* cookie);
|
||||
|
||||
extern status_t image_debug_lookup_user_symbol_address(struct team *team,
|
||||
addr_t address, addr_t *_baseAddress, const char **_symbolName,
|
||||
const char **_imageName, bool *_exactMatch);
|
||||
|
||||
Reference in New Issue
Block a user