1 /* 2 * Copyright 2008-2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _SYSTEM_INFO_H 6 #define _SYSTEM_INFO_H 7 8 9 #include <OS.h> 10 11 12 enum { 13 // team creation or deletion; object == -1; either one also triggers on 14 // exec() 15 B_WATCH_SYSTEM_TEAM_CREATION = 0x01, 16 B_WATCH_SYSTEM_TEAM_DELETION = 0x02, 17 18 // thread creation or deletion or property (name, priority) changes; 19 // object == team ID or -1 for all teams 20 B_WATCH_SYSTEM_THREAD_CREATION = 0x04, 21 B_WATCH_SYSTEM_THREAD_DELETION = 0x08, 22 B_WATCH_SYSTEM_THREAD_PROPERTIES = 0x10, 23 24 B_WATCH_SYSTEM_ALL 25 = B_WATCH_SYSTEM_TEAM_CREATION 26 | B_WATCH_SYSTEM_TEAM_DELETION 27 | B_WATCH_SYSTEM_THREAD_CREATION 28 | B_WATCH_SYSTEM_THREAD_DELETION 29 | B_WATCH_SYSTEM_THREAD_PROPERTIES 30 }; 31 32 enum { 33 // message what for the notification messages 34 B_SYSTEM_OBJECT_UPDATE = 'SOUP', 35 36 // "opcode" values 37 B_TEAM_CREATED = 0, 38 B_TEAM_DELETED = 1, 39 B_TEAM_EXEC = 2, 40 B_THREAD_CREATED = 3, 41 B_THREAD_DELETED = 4, 42 B_THREAD_NAME_CHANGED = 5 43 }; 44 45 46 #ifdef __cplusplus 47 extern "C" { 48 #endif 49 50 51 status_t __get_system_info(system_info* info); 52 status_t __get_cpu_topology_info(cpu_topology_node_info* topologyInfos, 53 uint32* topologyInfoCount); 54 55 status_t __start_watching_system(int32 object, uint32 flags, port_id port, 56 int32 token); 57 status_t __stop_watching_system(int32 object, uint32 flags, port_id port, 58 int32 token); 59 60 61 #ifdef __cplusplus 62 } 63 #endif 64 65 66 #endif /* _SYSTEM_INFO_H */ 67