[_{kern,user}_]{start,stop}_system_watching()
-> [_{kern,user}_]{start,stop}_watching_system() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39872 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
756b64fd83
commit
d23cadce4c
@ -25,10 +25,10 @@ status_t _user_get_system_info(system_info *userInfo, size_t size);
|
|||||||
status_t _user_get_system_info_etc(int32 id, void *buffer,
|
status_t _user_get_system_info_etc(int32 id, void *buffer,
|
||||||
size_t bufferSize);
|
size_t bufferSize);
|
||||||
|
|
||||||
status_t _user_start_system_watching(int32 object, uint32 flags,
|
status_t _user_start_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
port_id port, int32 token);
|
int32 token);
|
||||||
status_t _user_stop_system_watching(int32 object, uint32 flags,
|
status_t _user_stop_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
port_id port, int32 token);
|
int32 token);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -174,9 +174,9 @@ extern status_t _kern_get_team_usage_info(team_id team, int32 who,
|
|||||||
extern status_t _kern_get_extended_team_info(team_id teamID, uint32 flags,
|
extern status_t _kern_get_extended_team_info(team_id teamID, uint32 flags,
|
||||||
void* buffer, size_t size, size_t* _sizeNeeded);
|
void* buffer, size_t size, size_t* _sizeNeeded);
|
||||||
|
|
||||||
extern status_t _kern_start_system_watching(int32 object, uint32 flags,
|
extern status_t _kern_start_watching_system(int32 object, uint32 flags,
|
||||||
port_id port, int32 token);
|
port_id port, int32 token);
|
||||||
extern status_t _kern_stop_system_watching(int32 object, uint32 flags,
|
extern status_t _kern_stop_watching_system(int32 object, uint32 flags,
|
||||||
port_id port, int32 token);
|
port_id port, int32 token);
|
||||||
|
|
||||||
extern status_t _kern_block_thread(uint32 flags, bigtime_t timeout);
|
extern status_t _kern_block_thread(uint32 flags, bigtime_t timeout);
|
||||||
|
@ -65,9 +65,9 @@ extern "C" {
|
|||||||
|
|
||||||
status_t get_system_info_etc(int32 id, void* buffer, size_t bufferSize);
|
status_t get_system_info_etc(int32 id, void* buffer, size_t bufferSize);
|
||||||
|
|
||||||
status_t start_system_watching(int32 object, uint32 flags, port_id port,
|
status_t start_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
int32 token);
|
int32 token);
|
||||||
status_t stop_system_watching(int32 object, uint32 flags, port_id port,
|
status_t stop_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
int32 token);
|
int32 token);
|
||||||
|
|
||||||
|
|
||||||
|
@ -282,10 +282,11 @@ DebuggerInterface::Init()
|
|||||||
if (fSystemWatchPort < 0)
|
if (fSystemWatchPort < 0)
|
||||||
return fSystemWatchPort;
|
return fSystemWatchPort;
|
||||||
|
|
||||||
error = start_system_watching(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES,
|
error = start_watching_system(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES,
|
||||||
fSystemWatchPort, 0);
|
fSystemWatchPort, 0);
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
// TODO: Stop watching in Close()!
|
||||||
|
|
||||||
// create debug context pool
|
// create debug context pool
|
||||||
fDebugContextPool = new(std::nothrow) DebugContextPool(fTeamID, fNubPort);
|
fDebugContextPool = new(std::nothrow) DebugContextPool(fTeamID, fNubPort);
|
||||||
|
@ -524,7 +524,7 @@ _user_get_system_info_etc(int32 id, void* userInfo, size_t size)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
_user_start_system_watching(int32 object, uint32 flags, port_id port,
|
_user_start_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
int32 token)
|
int32 token)
|
||||||
{
|
{
|
||||||
return sSystemNotificationService.StartListening(object, flags, port,
|
return sSystemNotificationService.StartListening(object, flags, port,
|
||||||
@ -533,7 +533,7 @@ _user_start_system_watching(int32 object, uint32 flags, port_id port,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
_user_stop_system_watching(int32 object, uint32 flags, port_id port,
|
_user_stop_watching_system(int32 object, uint32 flags, port_id port,
|
||||||
int32 token)
|
int32 token)
|
||||||
{
|
{
|
||||||
return sSystemNotificationService.StopListening(object, flags, port, token);
|
return sSystemNotificationService.StopListening(object, flags, port, token);
|
||||||
|
@ -31,16 +31,16 @@ get_system_info_etc(int32 id, void *info, size_t size)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
start_system_watching(int32 object, uint32 flags, port_id port, int32 token)
|
start_watching_system(int32 object, uint32 flags, port_id port, int32 token)
|
||||||
{
|
{
|
||||||
return _kern_start_system_watching(object, flags, port, token);
|
return _kern_start_watching_system(object, flags, port, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
stop_system_watching(int32 object, uint32 flags, port_id port, int32 token)
|
stop_watching_system(int32 object, uint32 flags, port_id port, int32 token)
|
||||||
{
|
{
|
||||||
return _kern_stop_system_watching(object, flags, port, token);
|
return _kern_stop_watching_system(object, flags, port, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ main(int argc, const char* const* argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// start watching
|
// start watching
|
||||||
status_t error = start_system_watching(watchTeam, watchEvents, port, 0);
|
status_t error = start_watching_system(watchTeam, watchEvents, port, 0);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
fprintf(stderr, "Failed to start watching: %s\n", strerror(error));
|
fprintf(stderr, "Failed to start watching: %s\n", strerror(error));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user