aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2001-10-30 13:55:17 +0000
committertradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2001-10-30 13:55:17 +0000
commit64880e67b831da851cadf7c8bd51ff473d4e91b9 (patch)
tree9079fe0faf92ce24a986acda5a64e71de941e9ef
parent1fdb7d1b5d7d008a107f26e15c4422cfc285de1d (diff)
IOUtil_RestartFromRecovery() takes a 'const cGH *' argument now.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@132 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r--src/CheckpointRecovery.c19
-rw-r--r--src/ioutil_CheckpointRecovery.h2
2 files changed, 5 insertions, 16 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index cba3106..b512e50 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -764,25 +764,14 @@ void IOUtil_SetAllParameters (char *parameters)
}
-int IOUtil_RestartFromRecovery (cGH *GH)
+int IOUtil_RestartFromRecovery (const cGH *GH)
{
- ioGH *myGH;
- int handle;
- int result;
+ const ioGH *myGH;
- result = 0;
- handle = CCTK_GHExtensionHandle ("IO");
- if (GH != NULL && handle >= 0)
- {
- myGH = (ioGH *) GH->extensions[handle];
- if (myGH)
- {
- result = myGH->recovered;
- }
- }
+ myGH = (const ioGH *) CCTK_GHExtension (GH, "IO");
- return (result);
+ return (myGH ? myGH->recovered : 0);
}
diff --git a/src/ioutil_CheckpointRecovery.h b/src/ioutil_CheckpointRecovery.h
index 4340fda..dd5aa36 100644
--- a/src/ioutil_CheckpointRecovery.h
+++ b/src/ioutil_CheckpointRecovery.h
@@ -61,7 +61,7 @@ char *IOUtil_GetAllParameters (cGH *GH);
void IOUtil_SetAllParameters (char *parameters);
/* return true if this run was restarted from recovery, otherwise false */
-int IOUtil_RestartFromRecovery (cGH *GH);
+int IOUtil_RestartFromRecovery (const cGH *GH);
/* print the checkpoint/recovery timings to stdout */
void IOUtil_PrintTimings (const char *description,