public void bind(boolean wholeCore) {
        if (bound && assignedThread != null && assignedThread.isAlive())
            throw new IllegalStateException("cpu " + cpuId + " already bound to " + assignedThread);

        if (areAssertionsEnabled())
            boundHere = new Throwable("Bound here");
        if (wholeCore) {
            lockInventory.bindWholeCore(cpuId);

        } else if (cpuId >= 0) {
            bound = true;
            assignedThread = Thread.currentThread();
            LOGGER.info("Assigning cpu {} to {}", cpuId, assignedThread);
        }
        if (cpuId >= 0) {
            BitSet affinity = new BitSet();
            affinity.set(cpuId, true);
            Affinity.setAffinity(affinity);
        }
    }
public void bind ( boolean wholeCore ) { if ( bound && assignedThread != null && assignedThread . isAlive ( ) ) throw new IllegalStateException ( "cpu " + cpuId + " already bound to " + assignedThread ) ; if ( areAssertionsEnabled ( ) ) boundHere = new Throwable ( "Bound here" ) ; if ( wholeCore ) { lockInventory . bindWholeCore ( cpuId ) ; } else if ( cpuId >= 0 ) { bound = true ; assignedThread = Thread . currentThread ( ) ; LOGGER . info ( "Assigning cpu {} to {}" , cpuId , assignedThread ) ; } if ( cpuId >= 0 ) { BitSet affinity = new BitSet ( ) ; affinity . set ( cpuId , true ) ; Affinity . setAffinity ( affinity ) ; } }
Bind the current thread to this reservable lock.

@param wholeCore if true, also reserve the whole core.