From fb800f0088c508fc8a405249270206b7ac3704a2 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 26 Mar 1996 23:09:11 +0000 Subject: Get rid of mega typedefs, and just use structure pointers like other hurd libraries. Other misc cleanups. --- libps/host.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'libps/host.c') diff --git a/libps/host.c b/libps/host.c index f966fc93..26be9a31 100644 --- a/libps/host.c +++ b/libps/host.c @@ -1,6 +1,6 @@ /* Routines to get global host info. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Miles Bader @@ -38,11 +38,11 @@ /* Return the current host port. */ host_t -ps_get_host() +ps_get_host () { static host_t host = MACH_PORT_NULL; if (host == MACH_PORT_NULL) - host = mach_host_self(); + host = mach_host_self (); return host; } @@ -50,15 +50,15 @@ ps_get_host() this is static global information we just use a static buffer. If a system error occurs, the error code is returned, otherwise 0. */ error_t -ps_host_basic_info(host_basic_info_t *info) +ps_host_basic_info (host_basic_info_t *info) { - bool initialized = FALSE; + int initialized = FALSE; static host_basic_info_data_t buf; if (!initialized) { - int size = sizeof(buf); - error_t err = host_info(ps_get_host(), HOST_BASIC_INFO, + int size = sizeof (buf); + error_t err = host_info (ps_get_host (), HOST_BASIC_INFO, (host_info_t) &buf, &size); if (err) return err; @@ -73,15 +73,15 @@ ps_host_basic_info(host_basic_info_t *info) Since this is static global information we just use a static buffer. If a system error occurs, the error code is returned, otherwise 0. */ error_t -ps_host_sched_info(host_sched_info_t *info) +ps_host_sched_info (host_sched_info_t *info) { - bool initialized = FALSE; + int initialized = FALSE; static host_sched_info_data_t buf; if (!initialized) { - int size = sizeof(buf); - error_t err = host_info(ps_get_host(), HOST_SCHED_INFO, + int size = sizeof (buf); + error_t err = host_info (ps_get_host (), HOST_SCHED_INFO, (host_info_t) &buf, &size); if (err) return err; @@ -97,11 +97,11 @@ ps_host_sched_info(host_sched_info_t *info) to keep old load info, they should copy the buffer we return a pointer to). If a system error occurs, the error code is returned, otherwise 0. */ error_t -ps_host_load_info(host_load_info_t *info) +ps_host_load_info (host_load_info_t *info) { static host_load_info_data_t buf; - int size = sizeof(buf); - error_t err = host_info(ps_get_host(), HOST_LOAD_INFO, + int size = sizeof (buf); + error_t err = host_info (ps_get_host (), HOST_LOAD_INFO, (host_info_t) &buf, &size); if (err) -- cgit v1.2.3