void ClassLoaderData::packages_do(void f(PackageEntry*)) { if (_packages != NULL) { for (int i = 0; i < _packages->table_size(); i++) { for (PackageEntry* entry = _packages->bucket(i); entry != NULL; entry = entry->next()) { f(entry); } } } }
void ClassLoaderData::packages_do(void f(PackageEntry*)) { // Lock-free access requires load_ptr_acquire PackageEntryTable* packages = load_ptr_acquire(&_packages); if (packages != NULL) { for (int i = 0; i < packages->table_size(); i++) { for (PackageEntry* entry = packages->bucket(i); entry != NULL; entry = entry->next()) { f(entry); } } } }
static CoreEntry* choose_idle_core() { SCHEDULER_ENTER_FUNCTION(); PackageEntry* package = PackageEntry::GetLeastIdlePackage(); if (package == NULL) package = gIdlePackageList.Last(); if (package != NULL) return package->GetIdleCore(); return NULL; }