Open MPI logo

PLPA Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all PLPA Users mailing list

Subject: [PLPA users] [PATCH] use readdir on /sys/devices/system/cpu to get number of processors
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2008-03-21 07:50:24


To support holes in the logical processor IDs one can either try to
access() all PLPA_BITMASK_CPU_MAX processors and continue on failure,
or use readdir() to scan all entries of format "cpu%d". This patch
does the latter.

Bert

---