diff options
Diffstat (limited to 'src/sys.h')
| -rw-r--r-- | src/sys.h | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -11,43 +11,42 @@ #ifndef ZTOP_SYS_H #define ZTOP_SYS_H -#include <stdbool.h> #include <stdint.h> -#define ZJOB_MAX 512 +enum { ZJOB_MAX = 512 }; /** @brief One address space. */ -struct zjob { +typedef struct zjob { unsigned int asid; uint32_t ascb; char name[9]; -}; +} zjob; /** @brief The IPL date and time, decoded from the SMCA. */ -struct zipl { +typedef struct zipl { unsigned int year; unsigned int month; unsigned int day; /**< day of month */ unsigned int hour; unsigned int minute; unsigned int second; -}; +} zipl; /** @brief What the system view shows. */ -struct zsys { +typedef struct zsys { char sysname[9]; char host[65]; char os[64]; char machine[32]; unsigned int slots; /**< ASVT entries, used or free */ int njobs; - struct zjob job[ZJOB_MAX]; + zjob job[ZJOB_MAX]; bool ipl_ok; - struct zipl ipl; + zipl ipl; uint64_t real_k; /**< real storage online at IPL, in K */ uint32_t cvt; uint32_t smca; -}; +} zsys; /** * @brief Decode SMCAIDTE (0CYYDDDF, packed) and SMCAITME (hundredths). @@ -56,17 +55,17 @@ struct zsys { * @param out Where to write. * @return false when the fields do not describe a real date and time. */ -bool zipl_decode(uint32_t date, uint32_t hundredths, struct zipl *out); +bool zipl_decode(uint32_t date, uint32_t hundredths, zipl *out); /** * @brief Fill @p z from the CVT, the SMCA and the ASVT. * @param z Where to write. * @return false when this is not z/OS, with @c z untouched. */ -bool zsys_read(struct zsys *z); +bool zsys_read(zsys *z); /** @brief Auxiliary storage state, from the ASMVT. */ -struct zpage { +typedef struct zpage { bool common_pds; /**< a common page data set exists */ bool common_full; bool plpa_pds; @@ -77,13 +76,13 @@ struct zpage { bool warm_start; unsigned int vio_ci; /**< control intervals in the VIO journal */ uint32_t asmvt; -}; +} zpage; /** * @brief Fill @p p from the ASMVT. * @param p Where to write. * @return false when this is not z/OS or there is no ASMVT. */ -bool zpage_read(struct zpage *p); +bool zpage_read(zpage *p); #endif |
