commit | cf70aeeb83cbc1c582aca39793056904abcb1e57 | [log] [tgz] |
---|---|---|
author | Marat Dukhan <marat@fb.com> | Sat Mar 24 23:21:02 2018 -0700 |
committer | Marat Dukhan <marat@fb.com> | Sat Mar 24 23:21:02 2018 -0700 |
tree | 860516fa04782fd05a89747ce78c42163c093b49 | |
parent | 806dcca7bdd4759db446a26b2080e6cbf3307edd [diff] [blame] |
Report fatal error and abort if any cpuinfo_get_* function is called before initialization
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 @@ cpuinfo_cores_count = mach_topology.cores; cpuinfo_packages_count = mach_topology.packages; + __sync_synchronize(); + + cpuinfo_is_initialized = true; + processors = NULL; cores = NULL; packages = NULL;