tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kcpuset(9) questions

I was using kcpuset(9) a little bit today and I was surprised that
there was not a routine or a variable representing all of the attached
CPUs.  I see that there is such a MI variable declared in <sys/cpu.h>,
kcpuset_attached.  Should it be part of the API?

Also, kcpuset iterator would have been useful.  Perhaps there should be

/* If `kcp' is not empty, return the first CPU in `kcp' in `*cpuid' and
 * return true.  If `kcp' is empty, do not modify `*cpuid`, and return false.
bool kcpuset_first(const kcpuset_t *kcp, cpuid_t *cpuid);

/* Return the next CPU ID in `kcp' after `*cpuid' in `*cpuid' and
 * return true or, if there is no such ID, do not modify `*cpuid`, and
 * return false.
bool kcpuset_next(const kcpuset_t *kcp, cpuid_t *cpuid);


David Young    Urbana, IL    (217) 721-9981

Home | Main Index | Thread Index | Old Index