2006-08-24 21:51:20 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-09-15 02:22:34 +04:00
|
|
|
#ifndef ORTE_ODLS_PROCESS_EXPORT_H
|
|
|
|
#define ORTE_ODLS_PROCESS_EXPORT_H
|
2006-08-24 21:51:20 +04:00
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "opal/threads/condition.h"
|
|
|
|
#include "opal/mca/mca.h"
|
2006-10-20 06:25:50 +04:00
|
|
|
|
|
|
|
#include "orte/mca/rmgr/rmgr_types.h"
|
|
|
|
|
2006-09-15 02:22:34 +04:00
|
|
|
#include "orte/mca/odls/odls.h"
|
2006-08-24 21:51:20 +04:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Module open / close
|
|
|
|
*/
|
2006-09-15 02:22:34 +04:00
|
|
|
int orte_odls_process_component_open(void);
|
|
|
|
int orte_odls_process_component_close(void);
|
|
|
|
orte_odls_base_module_t* orte_odls_process_component_init(int *priority);
|
2006-08-24 21:51:20 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Startup / Shutdown
|
|
|
|
*/
|
2006-10-06 11:04:43 +04:00
|
|
|
int orte_odls_process_component_finalize(void);
|
2006-08-24 21:51:20 +04:00
|
|
|
|
2006-10-06 11:04:43 +04:00
|
|
|
/**
|
|
|
|
* ODLS Process globals
|
|
|
|
*/
|
|
|
|
typedef struct orte_odls_process_globals_t {
|
|
|
|
opal_mutex_t mutex;
|
|
|
|
opal_condition_t cond;
|
|
|
|
opal_list_t children;
|
|
|
|
} orte_odls_process_globals_t;
|
|
|
|
|
|
|
|
extern orte_odls_process_globals_t orte_odls_process;
|
2006-08-24 21:51:20 +04:00
|
|
|
|
|
|
|
/*
|
2006-10-06 11:04:43 +04:00
|
|
|
* List object to locally store the process names and pids of
|
|
|
|
* our children. This can subsequently be used to order termination
|
|
|
|
* or pass signals without looking the info up again.
|
2006-08-24 21:51:20 +04:00
|
|
|
*/
|
2006-10-06 11:04:43 +04:00
|
|
|
typedef struct odls_process_child_t {
|
|
|
|
opal_list_item_t super; /* required to place this on a list */
|
|
|
|
orte_process_name_t *name; /* the OpenRTE name of the proc */
|
|
|
|
pid_t pid; /* local pid of the proc */
|
|
|
|
orte_std_cntr_t app_idx; /* index of the app_context for this proc */
|
|
|
|
bool alive; /* is this proc alive? */
|
|
|
|
} odls_process_child_t;
|
|
|
|
OBJ_CLASS_DECLARATION(odls_process_child_t);
|
2006-08-24 21:51:20 +04:00
|
|
|
|
2006-10-06 11:04:43 +04:00
|
|
|
/*
|
|
|
|
* List object to locally store app_contexts returned by the
|
|
|
|
* registry subscription. Since we don't know how many app_contexts will
|
|
|
|
* be returned, we need to store them on a list.
|
2006-08-24 21:51:20 +04:00
|
|
|
*/
|
2006-10-06 11:04:43 +04:00
|
|
|
typedef struct odls_process_app_context_t {
|
|
|
|
opal_list_item_t super; /* required to place this on a list */
|
|
|
|
orte_app_context_t *app_context;
|
|
|
|
} odls_process_app_context_t;
|
|
|
|
OBJ_CLASS_DECLARATION(odls_process_app_context_t);
|
2006-08-24 21:51:20 +04:00
|
|
|
|
2006-10-06 11:04:43 +04:00
|
|
|
/*
|
|
|
|
* ODLS Process module
|
|
|
|
*/
|
2006-09-15 02:22:34 +04:00
|
|
|
extern orte_odls_base_module_t orte_odls_process_module;
|
2006-10-06 11:24:34 +04:00
|
|
|
ORTE_MODULE_DECLSPEC extern orte_odls_base_component_t mca_odls_process_component;
|
2006-08-24 21:51:20 +04:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2006-09-15 02:22:34 +04:00
|
|
|
#endif /* ORTE_ODLS_PROCESS_EXPORT_H */
|