< prev index next >

src/hotspot/os/bsd/os_bsd.cpp

Print this page

        

*** 3262,3272 **** uint apic_id = edx; int processor_id = Atomic::load(&mapping[apic_id]); while (processor_id < 0) { if (Atomic::cmpxchg(-2, &mapping[apic_id], -1)) { ! Atomic::store(Atomic::add(1, &next_processor_id) - 1, &mapping[apic_id]); } processor_id = Atomic::load(&mapping[apic_id]); } return (uint)processor_id; --- 3262,3272 ---- uint apic_id = edx; int processor_id = Atomic::load(&mapping[apic_id]); while (processor_id < 0) { if (Atomic::cmpxchg(-2, &mapping[apic_id], -1)) { ! Atomic::store(&mapping[apic_id], Atomic::add(1, &next_processor_id) - 1); } processor_id = Atomic::load(&mapping[apic_id]); } return (uint)processor_id;
< prev index next >