summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-27 23:51:21 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-27 23:51:21 +0000
commit7bf4dbb5a0de2a1cb88a4dd391f4396b547b6780 (patch)
tree7433949b0c1148e863ff518eec9ee6ae3d8551a5 /src
parent1a53d2c962018be2fa3f7299f4fbdae342149768 (diff)
Added
SYNC[HRONISE]: <group list> as an option to the schedule.ccl. This will be used to tell the flesh or the driver to synchronise these groups after the function has been executed. Tom NOTE: You will need to do a gmake <config>-rebuild after this update as the bindings stuff has changed. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1318 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/include/cctki_ScheduleBindings.h5
-rw-r--r--src/main/ScheduleInterface.c23
2 files changed, 20 insertions, 8 deletions
diff --git a/src/include/cctki_ScheduleBindings.h b/src/include/cctki_ScheduleBindings.h
index 58c2629b..6316f346 100644
--- a/src/include/cctki_ScheduleBindings.h
+++ b/src/include/cctki_ScheduleBindings.h
@@ -28,10 +28,12 @@ int CCTKi_ScheduleFunction(void *function,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
int n_before,
int n_after,
int n_while,
- ...);
+ ...
+ );
int CCTKi_ScheduleGroup(const char *name,
const char *thorn,
@@ -41,6 +43,7 @@ int CCTKi_ScheduleGroup(const char *name,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
int n_before,
int n_after,
int n_while,
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index d14a053b..04243e4a 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -99,6 +99,7 @@ static t_attribute *CreateAttribute(const char *description,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
va_list *ap);
static t_sched_modifier *CreateModifiers(int n_before,
int n_after,
@@ -123,8 +124,6 @@ static int CCTKi_ScheduleCallExit(t_attribute *attribute, t_sched_data *data);
static int CCTKi_ScheduleCallWhile(int n_whiles, char **whiles, t_attribute *attribute, t_sched_data *data);
static int CCTKi_ScheduleCallFunction(void *function, t_attribute *attribute, t_sched_data *data);
-static int CCTKi_ScheduleStartupFunction(void *function, t_attribute *attribute, t_sched_data *data);
-
static int SchedulePrintTimes(const char *where, t_sched_data *data);
static int CCTKi_SchedulePrintTimesEntry(t_attribute *attribute, t_sched_data *data);
@@ -238,6 +237,7 @@ int CCTKi_ScheduleFunction(void *function,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
int n_before,
int n_after,
int n_while,
@@ -252,7 +252,8 @@ int CCTKi_ScheduleFunction(void *function,
va_start(ap, n_while);
attribute = CreateAttribute(description, language, thorn, implementation,
- n_mem_groups, n_comm_groups, n_trigger_groups, &ap);
+ n_mem_groups, n_comm_groups, n_trigger_groups,
+ n_sync_groups, &ap);
modifier = CreateModifiers(n_before, n_after, n_while, &ap);
va_end(ap);
@@ -299,6 +300,7 @@ int CCTKi_ScheduleGroup(const char *name,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
int n_before,
int n_after,
int n_while,
@@ -313,7 +315,8 @@ int CCTKi_ScheduleGroup(const char *name,
va_start(ap, n_while);
attribute = CreateAttribute(description, NULL, thorn, implementation,
- n_mem_groups, n_comm_groups, n_trigger_groups, &ap);
+ n_mem_groups, n_comm_groups, n_trigger_groups,
+ n_sync_groups, &ap);
modifier = CreateModifiers(n_before, n_after, n_while, &ap);
va_end(ap);
@@ -659,6 +662,7 @@ static t_attribute *CreateAttribute(const char *description,
int n_mem_groups,
int n_comm_groups,
int n_trigger_groups,
+ int n_sync_groups,
va_list *ap)
{
t_attribute *this;
@@ -673,15 +677,17 @@ static t_attribute *CreateAttribute(const char *description,
this->mem_groups = (int *)malloc(n_mem_groups*sizeof(int));
this->comm_groups = (int *)malloc(n_comm_groups*sizeof(int));
this->trigger_groups = (int *)malloc(n_trigger_groups*sizeof(int));
+ this->FunctionData.SyncGroups = (int *)malloc(n_sync_groups*sizeof(int));
this->StorageOnEntry = (int *)malloc(n_mem_groups*sizeof(int));
this->CommOnEntry = (int *)malloc(n_comm_groups*sizeof(int));
if(this->description &&
this->thorn &&
this->implementation &&
- (this->mem_groups || n_mem_groups==0) &&
- (this->comm_groups || n_comm_groups==0) &&
- (this->trigger_groups || n_trigger_groups==0))
+ (this->mem_groups || n_mem_groups==0) &&
+ (this->comm_groups || n_comm_groups==0) &&
+ (this->trigger_groups || n_trigger_groups==0) &&
+ (this->FunctionData.SyncGroups || n_sync_groups==0))
{
strcpy(this->description, description);
strcpy(this->thorn, thorn);
@@ -702,10 +708,12 @@ static t_attribute *CreateAttribute(const char *description,
CreateGroupIndexList(n_mem_groups, this->mem_groups, ap);
CreateGroupIndexList(n_comm_groups, this->comm_groups, ap);
CreateGroupIndexList(n_trigger_groups, this->trigger_groups, ap);
+ CreateGroupIndexList(n_sync_groups, this->FunctionData.SyncGroups, ap);
this->n_mem_groups = n_mem_groups;
this->n_comm_groups = n_comm_groups;
this->n_trigger_groups = n_trigger_groups;
+ this->FunctionData.n_SyncGroups = n_sync_groups;
/* Add a timer to the item */
@@ -716,6 +724,7 @@ static t_attribute *CreateAttribute(const char *description,
free(this->description);
free(this->comm_groups);
free(this->trigger_groups);
+ free(this->FunctionData.SyncGroups);
free(this);
this = NULL;
}