* Fix up some version numbers
* Re-add module finalize function support This commit was SVN r14917.
Этот коммит содержится в:
родитель
ea0c03fd7a
Коммит
2e0b1b442f
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,6 +27,13 @@
|
||||
|
||||
int opal_paffinity_base_close(void)
|
||||
{
|
||||
/* If there is a selected paffinity module, finalize it */
|
||||
|
||||
if (NULL != opal_paffinity_base_module &&
|
||||
NULL != opal_paffinity_base_module->paff_module_finalize) {
|
||||
opal_paffinity_base_module->paff_module_finalize();
|
||||
}
|
||||
|
||||
/* Close all components that are still open (this should only
|
||||
happen during ompi_info). */
|
||||
|
||||
|
@ -56,7 +56,8 @@ static const opal_paffinity_base_module_1_1_0_t module = {
|
||||
/* Module function pointers */
|
||||
|
||||
linux_module_set,
|
||||
linux_module_get
|
||||
linux_module_get,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@ -146,4 +147,3 @@ static int linux_module_get(opal_paffinity_base_cpu_set_t *mask)
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -170,9 +170,16 @@ typedef int (*opal_paffinity_base_module_set_fn_t)(opal_paffinity_base_cpu_set_t
|
||||
typedef int (*opal_paffinity_base_module_get_fn_t)(opal_paffinity_base_cpu_set_t *cpumask);
|
||||
|
||||
|
||||
/**
|
||||
* Module finalize function. Invoked by the base on the selected
|
||||
* module when the paffinity framework is being shut down.
|
||||
*/
|
||||
typedef int (*opal_paffinity_base_module_finalize_fn_t)(void);
|
||||
|
||||
|
||||
/**
|
||||
* Structure for paffinity v1.1.0 components.
|
||||
* Chained to MCA v1.1.0
|
||||
* Chained to MCA v1.0.0
|
||||
*/
|
||||
struct opal_paffinity_base_component_1_1_0_t {
|
||||
/** MCA base component */
|
||||
@ -202,6 +209,9 @@ struct opal_paffinity_base_module_1_1_0_t {
|
||||
|
||||
/** Get this process' affinity */
|
||||
opal_paffinity_base_module_get_fn_t paff_module_get;
|
||||
|
||||
/** Shut down this module */
|
||||
opal_paffinity_base_module_finalize_fn_t paff_module_finalize;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
@ -215,7 +225,7 @@ typedef struct opal_paffinity_base_module_1_1_0_t opal_paffinity_base_module_1_1
|
||||
#define OPAL_PAFFINITY_BASE_VERSION_1_1_0 \
|
||||
/* paffinity v1.1 is chained to MCA v1.0 */ \
|
||||
MCA_BASE_VERSION_1_0_0, \
|
||||
/* paffinity v1.0 */ \
|
||||
"paffinity", 1, 0, 0
|
||||
/* paffinity v1.1 */ \
|
||||
"paffinity", 1, 1, 0
|
||||
|
||||
#endif /* OPAL_PAFFINITY_H */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user