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:
@@ -63,11 +63,11 @@ extern "C" {
|
||||
#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);
|
||||
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);
|
||||
|
||||
|
||||
|
||||
@@ -498,7 +498,7 @@ int64
|
||||
BlockCacheDataSource::NextValue(SystemInfo& info)
|
||||
{
|
||||
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));
|
||||
if (status != B_OK)
|
||||
return 0;
|
||||
@@ -946,7 +946,7 @@ CPUUsageDataSource::_SetCPU(int32 cpu)
|
||||
if (SystemInfo().CPUCount() > 1)
|
||||
fLabel << " " << cpu + 1;
|
||||
fShortLabel = fLabel;
|
||||
|
||||
|
||||
fLabel << " " << B_TRANSLATE("usage");
|
||||
|
||||
const rgb_color kColors[B_MAX_CPU_COUNT] = {
|
||||
@@ -1262,7 +1262,7 @@ NetworkUsageDataSource::Label() const
|
||||
const char*
|
||||
NetworkUsageDataSource::ShortLabel() const
|
||||
{
|
||||
return fIn ? B_TRANSLATE_COMMENT("RX", "Shorter version for Receiving.") :
|
||||
return fIn ? B_TRANSLATE_COMMENT("RX", "Shorter version for Receiving.") :
|
||||
B_TRANSLATE_COMMENT("TX", "Shorter version for Sending");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ SystemInfo::SystemInfo(SystemInfoHandler* handler)
|
||||
fMediaBuffers(0)
|
||||
{
|
||||
get_system_info(&fSystemInfo);
|
||||
get_system_info_etc(B_MEMORY_INFO, &fMemoryInfo,
|
||||
__get_system_info_etc(B_MEMORY_INFO, &fMemoryInfo,
|
||||
sizeof(system_memory_info));
|
||||
|
||||
if (handler != NULL) {
|
||||
|
||||
@@ -276,7 +276,7 @@ DebuggerInterface::Init()
|
||||
if (fNubPort < 0)
|
||||
return fNubPort;
|
||||
|
||||
error = start_watching_system(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES,
|
||||
error = __start_watching_system(fTeamID, B_WATCH_SYSTEM_THREAD_PROPERTIES,
|
||||
fDebuggerPort, 0);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
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));
|
||||
if (status != B_OK) {
|
||||
fprintf(stderr, "%s: cannot get system info: %s\n", kProgramName,
|
||||
@@ -90,7 +90,7 @@ main(int argc, char** argv)
|
||||
while (true) {
|
||||
snooze(rate);
|
||||
|
||||
get_system_info_etc(B_MEMORY_INFO, &info,
|
||||
__get_system_info_etc(B_MEMORY_INFO, &info,
|
||||
sizeof(system_memory_info));
|
||||
|
||||
printf("%11ld %11Ld %11Ld %11Ld\n",
|
||||
|
||||
@@ -21,7 +21,7 @@ _get_system_info(system_info *info, size_t size)
|
||||
|
||||
|
||||
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)
|
||||
return B_BAD_VALUE;
|
||||
@@ -31,14 +31,14 @@ get_system_info_etc(int32 id, void *info, size_t size)
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ main(int argc, const char* const* argv)
|
||||
}
|
||||
|
||||
// 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) {
|
||||
fprintf(stderr, "Failed to start watching: %s\n", strerror(error));
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user