added lock
This commit was SVN r1007.
Этот коммит содержится в:
родитель
e20000098e
Коммит
614decdd00
@ -33,6 +33,7 @@ void lam_proc_construct(lam_proc_t* proc)
|
|||||||
proc->proc_pml = NULL;
|
proc->proc_pml = NULL;
|
||||||
proc->proc_modex = NULL;
|
proc->proc_modex = NULL;
|
||||||
proc->proc_arch = 0;
|
proc->proc_arch = 0;
|
||||||
|
OBJ_CONSTRUCT(&proc->proc_lock, lam_mutex_t);
|
||||||
|
|
||||||
/* FIX - need to determine remote process architecture */
|
/* FIX - need to determine remote process architecture */
|
||||||
proc->proc_convertor = lam_convertor_create(0, 0);
|
proc->proc_convertor = lam_convertor_create(0, 0);
|
||||||
@ -48,6 +49,7 @@ void lam_proc_destruct(lam_proc_t* proc)
|
|||||||
THREAD_LOCK(&lam_proc_lock);
|
THREAD_LOCK(&lam_proc_lock);
|
||||||
lam_list_remove_item(&lam_proc_list, (lam_list_item_t*)proc);
|
lam_list_remove_item(&lam_proc_list, (lam_list_item_t*)proc);
|
||||||
THREAD_UNLOCK(&lam_proc_lock);
|
THREAD_UNLOCK(&lam_proc_lock);
|
||||||
|
OBJ_DESTRUCT(&proc->proc_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "include/types.h"
|
#include "include/types.h"
|
||||||
#include "lfc/lam_list.h"
|
#include "lfc/lam_list.h"
|
||||||
#include "datatype/datatype.h"
|
#include "datatype/datatype.h"
|
||||||
|
#include "threads/mutex.h"
|
||||||
|
|
||||||
|
|
||||||
extern lam_class_t lam_proc_t_class;
|
extern lam_class_t lam_proc_t_class;
|
||||||
@ -21,12 +22,9 @@ struct lam_proc_t {
|
|||||||
struct mca_base_modex_t* proc_modex; /* MCA module exchange data */
|
struct mca_base_modex_t* proc_modex; /* MCA module exchange data */
|
||||||
int proc_arch;
|
int proc_arch;
|
||||||
lam_convertor_t* proc_convertor;
|
lam_convertor_t* proc_convertor;
|
||||||
|
lam_mutex_t proc_lock;
|
||||||
|
|
||||||
/* JMS: need to have the following information:
|
/* JMS: need to have the following information:
|
||||||
|
|
||||||
- endian info
|
|
||||||
- type size info
|
|
||||||
- peer parallel job id
|
|
||||||
- how am i [mpi] connected (bitmap): spawn (parent/child),
|
- how am i [mpi] connected (bitmap): spawn (parent/child),
|
||||||
connect, accept, joint
|
connect, accept, joint
|
||||||
*/
|
*/
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user