root/dmtcpnohijackstubs.cpp
/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following definitions.
- _dmtcp_setup_trampolines
- dmtcp_get_ckpt_signal
- dmtcp_get_tmpdir
- dmtcp_get_uniquepid_str
- dmtcp_get_uniquepid
- dmtcp_get_computation_id
- dmtcp_is_running_state
- dmtcp_is_protected_fd
- dmtcp_no_coordinator
1 /****************************************************************************
2 * Copyright (C) 2006-2010 by Jason Ansel, Kapil Arya, and Gene Cooperman *
3 * jansel@csail.mit.edu, kapil@ccs.neu.edu, gene@ccs.neu.edu *
4 * *
5 * This file is part of DMTCP. *
6 * *
7 * DMTCP is free software: you can redistribute it and/or *
8 * modify it under the terms of the GNU Lesser General Public License as *
9 * published by the Free Software Foundation, either version 3 of the *
10 * License, or (at your option) any later version. *
11 * *
12 * DMTCP is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU Lesser General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License along with DMTCP:dmtcp/src. If not, see *
19 * <http://www.gnu.org/licenses/>. *
20 ****************************************************************************/
21
22 #include "uniquepid.h"
23 #include "../jalib/jassert.h"
24
25 #undef dmtcp_is_enabled
26 #undef dmtcp_checkpoint
27 #undef dmtcp_disable_ckpt
28 #undef dmtcp_enable_ckpt
29 #undef dmtcp_get_coordinator_status
30 #undef dmtcp_get_local_status
31 #undef dmtcp_get_uniquepid_str
32 #undef dmtcp_get_ckpt_filename
33
34 // dmtcp_launch, and dmtcp_coordinator, and dmtcp_command do not
35 // need to load dmtcpworker.cpp
36 // libdmtcpinternal.a contains code needed by dmtcpworker and the utilities
37 // alike.
38 // libnohijack.a contains stub functions (mostly empty definitions
39 // corresponding to definitions in libdmtcp.so. It includes
40 // nosyscallsreal.c and this file (dmtcpworkerstubs.cpp).
41 // libdmtcp.so and libsyscallsreal.a contain the wrappers and other code
42 // that executes within the end user process
43
44 // libdmtcp.so defines this differently
45
46 using namespace dmtcp;
47
48 void _dmtcp_setup_trampolines() {}
49
50 int dmtcp_get_ckpt_signal()
51 {
52 JASSERT(false) .Text ("NOT REACHED");
53 return -1;
54 }
55
56 const char* dmtcp_get_tmpdir()
57 {
58 JASSERT(false) .Text ("NOT REACHED");
59 return NULL;
60 }
61
62 const char* dmtcp_get_uniquepid_str()
63 {
64 static string uniquepid_str;
65 uniquepid_str = UniquePid::ThisProcess(true).toString();
66 return uniquepid_str.c_str();
67 }
68
69 DmtcpUniqueProcessId dmtcp_get_uniquepid()
70 {
71 return UniquePid::ThisProcess(true).upid();
72 }
73
74 DmtcpUniqueProcessId dmtcp_get_computation_id()
75 {
76 DmtcpUniqueProcessId id = {0, 0, 0, 0};
77 return id;
78 }
79
80 int dmtcp_is_running_state()
81 {
82 JASSERT(false);
83 return 0;
84 }
85
86 int dmtcp_is_protected_fd(int fd)
87 {
88 JASSERT(false);
89 return 0;
90 }
91
92 int dmtcp_no_coordinator()
93 {
94 JASSERT(false);
95 return 0;
96 }