Fix CID 1326: for the (unlikely) case where
opal_paffinity_base_get_processor_info() returns failure. This commit was SVN r22069.
Этот коммит содержится в:
родитель
5c1af9c2ba
Коммит
7900451e4e
@ -202,10 +202,11 @@ typedef struct opal_paffinity_base_cpu_set_t {
|
|||||||
#define OPAL_PAFFINITY_PROCESS_IS_BOUND(cpuset, bound) \
|
#define OPAL_PAFFINITY_PROCESS_IS_BOUND(cpuset, bound) \
|
||||||
do { \
|
do { \
|
||||||
int i, num_processors, num_bound; \
|
int i, num_processors, num_bound; \
|
||||||
opal_paffinity_base_get_processor_info(&num_processors); \
|
|
||||||
*(bound) = false; \
|
*(bound) = false; \
|
||||||
|
if (OPAL_SUCCESS == \
|
||||||
|
opal_paffinity_base_get_processor_info(&num_processors)) {\
|
||||||
num_bound = 0; \
|
num_bound = 0; \
|
||||||
for (i=0; i < num_processors; i++) { \
|
for (i = 0; i < num_processors; i++) { \
|
||||||
if (OPAL_PAFFINITY_CPU_ISSET(i, (cpuset))) { \
|
if (OPAL_PAFFINITY_CPU_ISSET(i, (cpuset))) { \
|
||||||
num_bound++; \
|
num_bound++; \
|
||||||
} \
|
} \
|
||||||
@ -213,6 +214,7 @@ typedef struct opal_paffinity_base_cpu_set_t {
|
|||||||
if (0 < num_bound && num_bound < num_processors) { \
|
if (0 < num_bound && num_bound < num_processors) { \
|
||||||
*(bound) = true; \
|
*(bound) = true; \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
} while(0);
|
} while(0);
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user