diff options
author | Marat Dukhan <marat@fb.com> | 2018-03-24 23:21:02 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2018-03-24 23:21:02 -0700 |
commit | cf70aeeb83cbc1c582aca39793056904abcb1e57 (patch) | |
tree | 860516fa04782fd05a89747ce78c42163c093b49 /src/arm/mach/init.c | |
parent | 806dcca7bdd4759db446a26b2080e6cbf3307edd (diff) | |
download | cpuinfo-cf70aeeb83cbc1c582aca39793056904abcb1e57.tar.gz |
Report fatal error and abort if any cpuinfo_get_* function is called before initialization
Diffstat (limited to 'src/arm/mach/init.c')
-rw-r--r-- | src/arm/mach/init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arm/mach/init.c b/src/arm/mach/init.c index 2d8feeb..d8e0ab6 100644 --- a/src/arm/mach/init.c +++ b/src/arm/mach/init.c @@ -483,6 +483,10 @@ void cpuinfo_arm_mach_init(void) { cpuinfo_cores_count = mach_topology.cores; cpuinfo_packages_count = mach_topology.packages; + __sync_synchronize(); + + cpuinfo_is_initialized = true; + processors = NULL; cores = NULL; packages = NULL; |