Move functions declared in private/system/system_info.h out of the public namespace.

* prepend private functions get_system_info_etc(), start_watching_system() and 
  stop_watching_system() with '__'
* adjust callers accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41517 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2011-05-15 17:02:36 +00:00
parent 22a7fe9695
commit 6a5ce30120
7 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -63,11 +63,11 @@ extern "C" {
#endif #endif
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_watching_system(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_watching_system(int32 object, uint32 flags, port_id port, status_t __stop_watching_system(int32 object, uint32 flags, port_id port,
int32 token); int32 token);
+1 -1
View File
@@ -498,7 +498,7 @@ int64
BlockCacheDataSource::NextValue(SystemInfo& info) BlockCacheDataSource::NextValue(SystemInfo& info)
{ {
system_memory_info memoryInfo; system_memory_info memoryInfo;
status_t status = get_system_info_etc(B_MEMORY_INFO, &memoryInfo, status_t status = __get_system_info_etc(B_MEMORY_INFO, &memoryInfo,
sizeof(system_memory_info)); sizeof(system_memory_info));
if (status != B_OK) if (status != B_OK)
return 0; return 0;
+1 -1
View File
@@ -24,7 +24,7 @@ SystemInfo::SystemInfo(SystemInfoHandler* handler)
fMediaBuffers(0) fMediaBuffers(0)
{ {
get_system_info(&fSystemInfo); get_system_info(&fSystemInfo);
get_system_info_etc(B_MEMORY_INFO, &fMemoryInfo, __get_system_info_etc(B_MEMORY_INFO, &fMemoryInfo,
sizeof(system_memory_info)); sizeof(system_memory_info));
if (handler != NULL) { if (handler != NULL) {
@@ -276,7 +276,7 @@ DebuggerInterface::Init()
if (fNubPort < 0) if (fNubPort < 0)
return fNubPort; return fNubPort;
error = start_watching_system(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES, error = __start_watching_system(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES,
fDebuggerPort, 0); fDebuggerPort, 0);
if (error != B_OK) if (error != B_OK)
return error; return error;
+2 -2
View File
@@ -67,7 +67,7 @@ main(int argc, char** argv)
} }
} }
system_memory_info info; system_memory_info info;
status_t status = get_system_info_etc(B_MEMORY_INFO, &info, status_t status = __get_system_info_etc(B_MEMORY_INFO, &info,
sizeof(system_memory_info)); sizeof(system_memory_info));
if (status != B_OK) { if (status != B_OK) {
fprintf(stderr, "%s: cannot get system info: %s\n", kProgramName, fprintf(stderr, "%s: cannot get system info: %s\n", kProgramName,
@@ -90,7 +90,7 @@ main(int argc, char** argv)
while (true) { while (true) {
snooze(rate); snooze(rate);
get_system_info_etc(B_MEMORY_INFO, &info, __get_system_info_etc(B_MEMORY_INFO, &info,
sizeof(system_memory_info)); sizeof(system_memory_info));
printf("%11ld %11Ld %11Ld %11Ld\n", printf("%11ld %11Ld %11Ld %11Ld\n",
+3 -3
View File
@@ -21,7 +21,7 @@ _get_system_info(system_info *info, size_t size)
status_t status_t
get_system_info_etc(int32 id, void *info, size_t size) __get_system_info_etc(int32 id, void *info, size_t size)
{ {
if (info == NULL || size == 0 || id < 0) if (info == NULL || size == 0 || id < 0)
return B_BAD_VALUE; return B_BAD_VALUE;
@@ -31,14 +31,14 @@ get_system_info_etc(int32 id, void *info, size_t size)
status_t status_t
start_watching_system(int32 object, uint32 flags, port_id port, int32 token) __start_watching_system(int32 object, uint32 flags, port_id port, int32 token)
{ {
return _kern_start_watching_system(object, flags, port, token); return _kern_start_watching_system(object, flags, port, token);
} }
status_t status_t
stop_watching_system(int32 object, uint32 flags, port_id port, int32 token) __stop_watching_system(int32 object, uint32 flags, port_id port, int32 token)
{ {
return _kern_stop_watching_system(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_watching_system(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);