1 |
/* Routines to get global host info. |
/* Routines to get global host info. |
2 |
|
|
3 |
Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc. |
Copyright (C) 1995,96,2001,02 Free Software Foundation, Inc. |
4 |
|
|
5 |
Written by Miles Bader <miles@gnu.org> |
Written by Miles Bader <miles@gnu.org> |
6 |
|
|
58 |
|
|
59 |
if (!initialized) |
if (!initialized) |
60 |
{ |
{ |
61 |
int size = sizeof (buf); |
size_t size = sizeof (buf); |
62 |
error_t err = host_info (ps_get_host (), HOST_BASIC_INFO, |
error_t err = host_info (ps_get_host (), HOST_BASIC_INFO, |
63 |
(host_info_t) &buf, &size); |
(host_info_t) &buf, &size); |
64 |
if (err) |
if (err) |
82 |
|
|
83 |
if (!initialized) |
if (!initialized) |
84 |
{ |
{ |
85 |
int size = sizeof (buf); |
size_t size = sizeof (buf); |
86 |
error_t err = host_info (ps_get_host (), HOST_SCHED_INFO, |
error_t err = host_info (ps_get_host (), HOST_SCHED_INFO, |
87 |
(host_info_t) &buf, &size); |
(host_info_t) &buf, &size); |
88 |
if (err) |
if (err) |
102 |
ps_host_load_info (host_load_info_t *info) |
ps_host_load_info (host_load_info_t *info) |
103 |
{ |
{ |
104 |
static host_load_info_data_t buf; |
static host_load_info_data_t buf; |
105 |
int size = sizeof (buf); |
size_t size = sizeof (buf); |
106 |
error_t err = host_info (ps_get_host (), HOST_LOAD_INFO, |
error_t err = host_info (ps_get_host (), HOST_LOAD_INFO, |
107 |
(host_info_t) &buf, &size); |
(host_info_t) &buf, &size); |
108 |
|
|