static int hwloc_look_solaris(struct hwloc_backend *backend) { struct hwloc_topology *topology = backend->topology; unsigned nbprocs = hwloc_fallback_nbprocessors (topology); int alreadypus = 0; if (topology->levels[0][0]->cpuset) /* somebody discovered things */ return 0; hwloc_alloc_obj_cpusets(topology->levels[0][0]); #ifdef HAVE_LIBLGRP hwloc_look_lgrp(topology); #endif /* HAVE_LIBLGRP */ #ifdef HAVE_LIBKSTAT if (hwloc_look_kstat(topology) > 0) alreadypus = 1; #endif /* HAVE_LIBKSTAT */ if (!alreadypus) hwloc_setup_pu_level(topology, nbprocs); hwloc_obj_add_info(topology->levels[0][0], "Backend", "Solaris"); if (topology->is_thissystem) hwloc_add_uname_info(topology, NULL); return 1; }
void hwloc_look_solaris(struct hwloc_topology *topology) { unsigned nbprocs = hwloc_fallback_nbprocessors (topology); int alreadypus = 0; #ifdef HAVE_LIBLGRP hwloc_look_lgrp(topology); #endif /* HAVE_LIBLGRP */ #ifdef HAVE_LIBKSTAT nbprocs = 0; if (hwloc_look_kstat(topology)) alreadypus = 1; #endif /* HAVE_LIBKSTAT */ if (!alreadypus) hwloc_setup_pu_level(topology, nbprocs); hwloc_obj_add_info(topology->levels[0][0], "Backend", "Solaris"); }