From 64880e67b831da851cadf7c8bd51ff473d4e91b9 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 30 Oct 2001 13:55:17 +0000 Subject: 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 --- src/CheckpointRecovery.c | 19 ++++--------------- src/ioutil_CheckpointRecovery.h | 2 +- 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, -- cgit v1.2.3