summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-02-17 17:28:31 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-02-17 17:28:31 +0000
commit08dc979087660675bc153de2dedd93526dd3b786 (patch)
tree95c5ab5b6e5166c06bb249f8456b225c78ddcb3d /src
parent79673464abf45b44c52656b55c9e5d50df61fd3a (diff)
Now scheduling a group AS preserves the identity of the group, allowing
people to schedule in the real name and then schedule many aliases of the group in the same schedule bin or parent group. Note that you need to do a make <config>-rebuild on your configurations after updating with this change. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@3147 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r--src/include/cctki_Schedule.h12
-rw-r--r--src/include/cctki_ScheduleBindings.h8
-rw-r--r--src/main/ScheduleInterface.c14
-rw-r--r--src/schedule/ScheduleCreater.c23
4 files changed, 32 insertions, 25 deletions
diff --git a/src/include/cctki_Schedule.h b/src/include/cctki_Schedule.h
index 037ac053..2b77b826 100644
--- a/src/include/cctki_Schedule.h
+++ b/src/include/cctki_Schedule.h
@@ -45,13 +45,11 @@ int CCTKi_DoScheduleFunction(const char *gname,
t_sched_modifier *modifiers,
void *attributes);
-int CCTKi_DoScheduleGroup
- (
- const char *gname,
- const char *thisname,
- t_sched_modifier *modifiers,
- void *attributes
- );
+int CCTKi_DoScheduleGroup(const char *gname,
+ const char *thisname,
+ const char *realname,
+ t_sched_modifier *modifiers,
+ void *attributes);
/* Routine to sort the groups - must be called before traversal. */
int CCTKi_DoScheduleSortAllGroups(void);
diff --git a/src/include/cctki_ScheduleBindings.h b/src/include/cctki_ScheduleBindings.h
index 4c8e8aea..c318effd 100644
--- a/src/include/cctki_ScheduleBindings.h
+++ b/src/include/cctki_ScheduleBindings.h
@@ -36,7 +36,8 @@ int CCTKi_ScheduleFunction(void *function,
const int *timelevels,
...);
-int CCTKi_ScheduleGroup(const char *name,
+int CCTKi_ScheduleGroup(const char *realname,
+ const char *name,
const char *thorn,
const char *implementation,
const char *description,
@@ -49,8 +50,9 @@ int CCTKi_ScheduleGroup(const char *name,
int n_before,
int n_after,
int n_while,
- const int *timelevels,
- ...);
+ const int *timelevels,
+ ...
+ );
int CCTKi_ScheduleGroupStorage(const char *group, int timelevels);
diff --git a/src/main/ScheduleInterface.c b/src/main/ScheduleInterface.c
index 90a3dd96..b7607dc2 100644
--- a/src/main/ScheduleInterface.c
+++ b/src/main/ScheduleInterface.c
@@ -289,7 +289,7 @@ int CCTK_CallFunction(void *function,
@vio in
@endvar
@var name
- @vdesc name of function to be scheduled
+ @vdesc working name of function to be scheduled
@vtype const char *
@vio in
@endvar
@@ -438,8 +438,13 @@ int CCTKi_ScheduleFunction(void *function,
@enddesc
@calls
+ @var realname
+ @vdesc real name of group to be scheduled
+ @vtype const char *
+ @vio in
+ @endvar
@var name
- @vdesc name of group to be scheduled
+ @vdesc working name of group to be scheduled
@vtype const char *
@vio in
@endvar
@@ -518,7 +523,8 @@ int CCTKi_ScheduleFunction(void *function,
-1 - memory failure
@endreturndesc
@@*/
-int CCTKi_ScheduleGroup(const char *name,
+int CCTKi_ScheduleGroup(const char *realname,
+ const char *name,
const char *thorn,
const char *implementation,
const char *description,
@@ -553,7 +559,7 @@ int CCTKi_ScheduleGroup(const char *name,
if(attribute && (modifier || (n_before == 0 && n_after == 0 && n_while == 0)))
{
- retcode = CCTKi_DoScheduleGroup(where, name, modifier, (void *)attribute);
+ retcode = CCTKi_DoScheduleGroup(where, name, realname, modifier, (void *)attribute);
#ifdef DEBUG
fprintf(stderr, "Scheduled %s at %s\n", name, where);
#endif
diff --git a/src/schedule/ScheduleCreater.c b/src/schedule/ScheduleCreater.c
index 3b512be0..51a186b8 100644
--- a/src/schedule/ScheduleCreater.c
+++ b/src/schedule/ScheduleCreater.c
@@ -148,7 +148,7 @@ t_sched_modifier *CCTKi_ScheduleAddModifier(t_sched_modifier *orig,
@vio in
@vcomment
@var fname
- @vdesc name of function to be scheduled
+ @vdesc name of function to be scheduled (may be aliased)
@vtype const char *
@vio in
@vcomment
@@ -237,25 +237,25 @@ int CCTKi_DoScheduleFunction(const char *gname,
@vdesc name of group to schedule group in
@vtype const char *
@vio in
- @vcomment
@var thisname
- @vdesc name of group to be scheduled
+ @vdesc name of group to be scheduled (possibly an alias)
@vtype const char *
@vio in
- @vcomment
+ @endvar
+ @var realname
+ @vdesc actual name of group to be scheduled
+ @vtype const char *
+ @vio in
+ @endvar
@var modifiers
@vdesc moodifier list
@vtype t_sched_modifier *
@vio in
- @vcomment
-
@endvar
@var attributes
@vdesc function attributes
@vtype void *
@vio in
- @vcomment
-
@endvar
@returntype int
@@ -265,7 +265,8 @@ int CCTKi_DoScheduleFunction(const char *gname,
@endreturndesc
@@*/
int CCTKi_DoScheduleGroup(const char *gname,
- const char *thisname,
+ const char *thisname,
+ const char *realname,
t_sched_modifier *modifiers,
void *attributes)
{
@@ -284,11 +285,11 @@ int CCTKi_DoScheduleGroup(const char *gname,
}
/* Find this group */
- thishandle = Util_GetHandle(schedule_groups, thisname, (void **)&this_group);
+ thishandle = Util_GetHandle(schedule_groups, realname, (void **)&this_group);
if(thishandle < 0)
{
- thishandle = ScheduleCreateGroup(thisname);
+ thishandle = ScheduleCreateGroup(realname);
}
if(handle < 0 || thishandle < 0)