diff options
| author | Karel Zak <kzak@redhat.com> | 2020-05-07 14:19:39 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2020-11-13 09:19:02 +0100 |
| commit | d34b7f1b8224066e380f978dbe3ab97d283fb108 (patch) | |
| tree | 81fff7ab6dd0de09928debe89a46f3a606938dae /sys-utils/lscpu-api.h | |
| parent | d234a381018f3e16bb654978965be30f9bd38925 (diff) | |
| download | util-linux-d34b7f1b8224066e380f978dbe3ab97d283fb108.tar.gz | |
lscpu: add lscpu_read_architecture()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu-api.h')
| -rw-r--r-- | sys-utils/lscpu-api.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys-utils/lscpu-api.h b/sys-utils/lscpu-api.h index bb9d381bfd..ca4550c924 100644 --- a/sys-utils/lscpu-api.h +++ b/sys-utils/lscpu-api.h @@ -65,8 +65,6 @@ struct lscpu_cputype { int threads; int ndrawers; - unsigned int bit32:1, - bit64:1; }; struct lscpu_cpu { @@ -80,6 +78,13 @@ struct lscpu_cpu { char *static_mhz; }; +struct lscpu_arch { + char *name; /* uname() .machine */ + + unsigned int bit32:1, + bit64:1; +}; + struct lscpu_cxt { const char *prefix; /* path to /sys and /proc snapshot or NULL */ @@ -92,6 +97,9 @@ struct lscpu_cxt { size_t ncpus; struct lscpu_cpu **cpus; + struct lscpu_arch *arch; + + unsigned int noalive; }; struct lscpu_cputype *lscpu_new_cputype(void); @@ -99,7 +107,9 @@ void lscpu_ref_cputype(struct lscpu_cputype *ct); void lscpu_unref_cputype(struct lscpu_cputype *ct); struct lscpu_cputype *lscpu_add_cputype(struct lscpu_cxt *cxt, struct lscpu_cputype *ct); struct lscpu_cputype *lscpu_cputype_get_default(struct lscpu_cxt *cxt); + int lscpu_read_cpuinfo(struct lscpu_cxt *cxt); +int lscpu_read_architecture(struct lscpu_cxt *cxt); struct lscpu_cpu *lscpu_new_cpu(void); void lscpu_ref_cpu(struct lscpu_cpu *cpu); |
