summaryrefslogtreecommitdiffhomepage
path: root/src/sys.h
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-27 18:15:26 -0600
committerGitHub <noreply@github.com>2026-11-27 18:15:26 -0600
commit83e8fbc692b36be5ac9011ccf26b1b232d560008 (patch)
treeab62a06c6a49b343b33d41b502487b233128ad80 /src/sys.h
parent4c95e6490d189b47cad050744de9768465e0307b (diff)
parentb5bb63d4760f6f6e0282fc9f7eec36b41705458c (diff)
downloadztop-main.tar.gz
Merge pull request #7 from skurtz97/feature/views-and-dec-glyphsHEADmain
views: PS, FS and LOG, and a DEC-graphics frame
Diffstat (limited to 'src/sys.h')
-rw-r--r--src/sys.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/sys.h b/src/sys.h
index c52ee42..31c9950 100644
--- a/src/sys.h
+++ b/src/sys.h
@@ -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