summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-28 00:26:01 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-28 00:26:01 +0000
commit9e7d1e7e41edf992a143e6c91638f71f170199b5 (patch)
tree39ef1b8b158949db01c7bb5e46cbc38054e16dbe /src
parent9c97a201f9e51181bf3143c6d8a0dedfc23c742d (diff)
Now if the calling function used to call a function doesn't return true,
the flesh will synchronise the groups in that function's sync-list. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1322 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/main/ScheduleInterface.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index 04243e4a..e5b960f5 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -21,6 +21,7 @@ static char *rcsid = "$Header$";
#include "cctk_Flesh.h"
#include "cctk_Comm.h"
+#include "cctk_Sync.h"
#include "cctk_Groups.h"
#include "cctk_GroupsOnGH.h"
@@ -210,6 +211,7 @@ int CCTK_CallFunction(void *function,
CCTK_WARN(1, "Unknown function type.");
}
+ /* Return 0, meaning didn't synchronise */
return 0;
}
@@ -1244,15 +1246,25 @@ static int CCTKi_ScheduleCallFunction(void *function,
t_attribute *attribute,
t_sched_data *data)
{
+ int synchronised;
+
CCTK_TimerStartI(attribute->timer_handle);
/* Use whatever has been chosen as the calling function for this
* function.
*/
- data->CallFunction(function, &(attribute->FunctionData), data->GH);
+ synchronised = data->CallFunction(function, &(attribute->FunctionData), data->GH);
CCTK_TimerStopI(attribute->timer_handle);
+ /* Synchronise the groups if necessary */
+ if(!synchronised)
+ {
+ CCTK_SyncGroupsI(data->GH,
+ attribute->FunctionData.n_SyncGroups,
+ attribute->FunctionData.SyncGroups);
+ }
+
return 1;
}