Skip to content

Commit

Permalink
patcher: add priority parameters for patcher components
Browse files Browse the repository at this point in the history
This commit adds a priority parameter to each of the patcher
components. I also updated the relative priority of the linux and
overwrite components until the linux component can be fixed. It misses
some some calls to munmap at the moment.

Signed-off-by: Nathan Hjelm <[email protected]>
  • Loading branch information
hjelmn committed Apr 9, 2016
1 parent fd83d8c commit c481e96
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions opal/mca/patcher/linux/patcher_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ typedef struct mca_patcher_linux_patch_t mca_patcher_linux_patch_t;
OBJ_CLASS_DECLARATION(mca_patcher_linux_patch_t);

extern mca_patcher_base_module_t mca_patcher_linux_module;
extern mca_patcher_base_component_t mca_patcher_linux_component;

#endif /* !defined(OPAL_PATCHER_LINUX_H) */
16 changes: 15 additions & 1 deletion opal/mca/patcher/linux/patcher_linux_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,23 @@

#include "patcher_linux.h"

static int mca_patcher_linux_priority;

static int mca_patcher_linux_register (void)
{
mca_patcher_linux_priority = 13;
mca_base_component_var_register (&mca_patcher_linux_component.patcherc_version,
"priority", "Priority of the linux binary patcher component",
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5,
MCA_BASE_VAR_SCOPE_CONSTANT, &mca_patcher_linux_priority);

return OPAL_SUCCESS;
}

static int mca_patcher_linux_query (mca_base_module_t **module, int *priority)
{
*module = &mca_patcher_linux_module.super;
*priority = 37;
*priority = mca_patcher_linux_priority;
return OPAL_SUCCESS;
}

Expand All @@ -25,5 +38,6 @@ mca_patcher_base_component_t mca_patcher_linux_component = {
MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
OPAL_RELEASE_VERSION),
.mca_query_component = mca_patcher_linux_query,
.mca_register_component_params = mca_patcher_linux_register,
},
};
1 change: 1 addition & 0 deletions opal/mca/patcher/overwrite/patcher_overwrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
#include "opal/class/opal_list.h"

extern mca_patcher_base_module_t mca_patcher_overwrite_module;
extern mca_patcher_base_component_t mca_patcher_overwrite_component;

#endif /* !defined(OPAL_PATCHER_OVERWRITE_H) */
16 changes: 15 additions & 1 deletion opal/mca/patcher/overwrite/patcher_overwrite_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,23 @@
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"

static int mca_patcher_overwrite_priority;

static int mca_patcher_overwrite_register (void)
{
mca_patcher_overwrite_priority = 37;
mca_base_component_var_register (&mca_patcher_overwrite_component.patcherc_version,
"priority", "Priority of the overwrite binary patcher component",
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0, OPAL_INFO_LVL_5,
MCA_BASE_VAR_SCOPE_CONSTANT, &mca_patcher_overwrite_priority);

return OPAL_SUCCESS;
}

static int mca_patcher_overwrite_query (mca_base_module_t **module, int *priority)
{
*module = &mca_patcher_overwrite_module.super;
*priority = 10;
*priority = mca_patcher_overwrite_priority;
return OPAL_SUCCESS;
}

Expand All @@ -27,5 +40,6 @@ mca_patcher_base_component_t mca_patcher_overwrite_component = {
MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
OPAL_RELEASE_VERSION),
.mca_query_component = mca_patcher_overwrite_query,
.mca_register_component_params = mca_patcher_overwrite_register,
},
};

0 comments on commit c481e96

Please sign in to comment.