* 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:
Ingo Weinhold
2009-04-11 21:45:25 +00:00
parent 78c00a4a53
commit efd536ff89
12 changed files with 242 additions and 113 deletions
+10
View File
@@ -23,6 +23,12 @@ struct select_info;
struct thread_creation_attributes;
// thread notifications
#define THREAD_MONITOR '_tm_'
#define THREAD_ADDED 0x01
#define THREAD_REMOVED 0x02
#ifdef __cplusplus
extern "C" {
#endif
@@ -70,6 +76,10 @@ thread_is_idle_thread(struct thread *thread)
return thread->entry == NULL;
}
typedef bool (*thread_iterator_callback)(struct thread* thread, void* cookie);
struct thread* thread_iterate_through_threads(thread_iterator_callback callback,
void* cookie);
thread_id allocate_thread_id(void);
thread_id peek_next_thread_id(void);