summaryrefslogtreecommitdiff
path: root/src/include/cctki_Schedule.h
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-04-09 03:37:21 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2008-04-09 03:37:21 +0000
commita780159bccfd17395ac08e394b1464d7e57fc249 (patch)
tree6fd9ed0b23e9fa4e48d17ca8a65d35ad4b7a3fb7 /src/include/cctki_Schedule.h
parenta9833d5a888148fde04946252e997b4642eb7c47 (diff)
Add IF clauses to schedule items
Schedule items in Cactus can already have WHILE clauses, which means that they are executed while a certain condition are true. This patch adds IF clauses, which means that they are executed only if a certain condition is true. The syntax is equivalent to WHILE clauses. These if clauses is different from the existing C-syntax if statements, which are only evaluated at startup and determine how the schedule is constructed. These if clauses are evaluated every time the schedule is traversed, and can skip certain schedule items. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4478 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctki_Schedule.h')
-rw-r--r--src/include/cctki_Schedule.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/include/cctki_Schedule.h b/src/include/cctki_Schedule.h
index 2b77b826..9361053d 100644
--- a/src/include/cctki_Schedule.h
+++ b/src/include/cctki_Schedule.h
@@ -14,7 +14,11 @@
/* Types needed by other routines. */
-typedef enum {sched_mod_none, sched_before, sched_after, sched_while} t_sched_modifier_type;
+typedef enum {
+ sched_mod_none,
+ sched_before, sched_after,
+ sched_while, sched_if
+} t_sched_modifier_type;
typedef struct T_SCHED_MODIFIER
{
@@ -58,7 +62,8 @@ int CCTKi_DoScheduleSortAllGroups(void);
int CCTKi_DoScheduleTraverse(const char *group_name,
int (*item_entry)(void *, void *),
int (*item_exit)(void *, void *),
- int (*while_check)(int, char **, void *, void *, int),
+ int (*while_check)(int, char **, void *, void *, int),
+ int (*if_check)(int, char **, void *, void *),
int (*function_process)(void *, void *, void *),
void *data);