This source file includes following definitions.
- MPI_Win_unlock
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #include "ompi_config.h"
24 #include <stdio.h>
25
26 #include "ompi/mpi/c/bindings.h"
27 #include "ompi/runtime/params.h"
28 #include "ompi/communicator/communicator.h"
29 #include "ompi/errhandler/errhandler.h"
30 #include "ompi/win/win.h"
31 #include "ompi/mca/osc/osc.h"
32
33 #if OMPI_BUILD_MPI_PROFILING
34 #if OPAL_HAVE_WEAK_SYMBOLS
35 #pragma weak MPI_Win_unlock = PMPI_Win_unlock
36 #endif
37 #define MPI_Win_unlock PMPI_Win_unlock
38 #endif
39
40 static const char FUNC_NAME[] = "MPI_Win_unlock";
41
42
43 int MPI_Win_unlock(int rank, MPI_Win win)
44 {
45 int rc;
46
47 if (MPI_PARAM_CHECK) {
48 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
49
50 if (ompi_win_invalid(win)) {
51 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
52 } else if (ompi_win_peer_invalid(win, rank)) {
53 return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_RANK, FUNC_NAME);
54 }
55 }
56
57 OPAL_CR_ENTER_LIBRARY();
58
59 rc = win->w_osc_module->osc_unlock(rank, win);
60 OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
61 }