Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
c81d0f75
Commit
c81d0f75
authored
Sep 06, 2011
by
James Dinan
Browse files
[svn-r8996] Converted MPIX_Mutex_destroy to MPI style.
parent
f7069019
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/include/mpix.h
View file @
c81d0f75
...
...
@@ -23,10 +23,10 @@ int MPIX_Group_comm_create(MPI_Comm old_comm, MPI_Group group, int tag, MPI_Comm
struct
mpixi_mutex_s
;
typedef
struct
mpixi_mutex_s
*
MPIX_Mutex
;
int
MPIX_Mutex_create
(
int
count
,
MPI_Comm
comm
,
MPIX_Mutex
*
hdl
);
int
MPIX_Mutex_
destroy
(
MPIX_Mutex
hdl
);
int
MPIX_Mutex_lock
(
MPIX_Mutex
hdl
,
int
mutex
,
int
proc
);
int
MPIX_Mutex_unlock
(
MPIX_Mutex
hdl
,
int
mutex
,
int
proc
);
int
MPIX_Mutex_create
(
int
count
,
MPI_Comm
comm
,
MPIX_Mutex
*
hdl
);
int
MPIX_Mutex_
free
(
MPIX_Mutex
*
hdl
);
int
MPIX_Mutex_lock
(
MPIX_Mutex
hdl
,
int
mutex
,
int
proc
);
int
MPIX_Mutex_unlock
(
MPIX_Mutex
hdl
,
int
mutex
,
int
proc
);
#if defined(__cplusplus)
}
...
...
src/mpix/mutex/mutex.c
View file @
c81d0f75
...
...
@@ -95,12 +95,13 @@ int MPIX_Mutex_create(int my_count, MPI_Comm comm, MPIX_Mutex *hdl_out) {
}
/**
Destroy
a group of MPI mutexes. Collective.
/**
Free
a group of MPI mutexes. Collective.
*
* @param[in] hdl Handle to the group that should be destroyed.
* @return Zero on success, non-zero otherwise.
*/
int
MPIX_Mutex_destroy
(
MPIX_Mutex
hdl
)
{
int
MPIX_Mutex_free
(
MPIX_Mutex
*
hdl_ptr
)
{
MPIX_Mutex
hdl
=
*
hdl_ptr
;
int
i
;
for
(
i
=
0
;
i
<
hdl
->
max_count
;
i
++
)
{
...
...
@@ -116,6 +117,7 @@ int MPIX_Mutex_destroy(MPIX_Mutex hdl) {
MPI_Comm_free
(
&
hdl
->
comm
);
free
(
hdl
);
hdl_ptr
=
NULL
;
return
MPI_SUCCESS
;
}
...
...
test/mpix/mutex/mutex_lock_unlock.c
View file @
c81d0f75
...
...
@@ -44,7 +44,7 @@ int main(int argc, char ** argv) {
fflush
(
NULL
);
}
MPIX_Mutex_
destroy
(
mtx
);
MPIX_Mutex_
free
(
&
mtx
);
if
(
rank
==
0
)
printf
(
" No Errors
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment