summaryrefslogtreecommitdiff
path: root/src/include/cctki_Schedule.h
blob: 037ac0530f43175f57d6a7961bf451df6db7bde5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 /*@@
   @header    cctki_Schedule.h
   @date      Wed Sep 15 22:49:24 1999
   @author    Tom Goodale
   @desc 
   Schedule stuff from the core schedule subsystem
   which can be seen by the rest of the flesh.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _CCTKI_SCHEDULE_H_
#define _CCTKI_SCHEDULE_H_ 1

/* Types needed by other routines. */

typedef enum {sched_mod_none, sched_before, sched_after, sched_while} t_sched_modifier_type;

typedef struct T_SCHED_MODIFIER
{
  struct T_SCHED_MODIFIER *next;

  t_sched_modifier_type type;
  
  char *argument;

} t_sched_modifier;


#ifdef __cplusplus
extern "C" 
{
#endif

/* Routines to create items */
t_sched_modifier *CCTKi_ScheduleAddModifier(t_sched_modifier *orig, 
                                           const char *modifier, 
                                           const char *argument);



int CCTKi_DoScheduleFunction(const char *gname, 
                             const char *fname, 
                             void *func, 
                             t_sched_modifier *modifiers, 
                             void *attributes);

int CCTKi_DoScheduleGroup
  (
   const char *gname, 
   const char *thisname, 
   t_sched_modifier *modifiers, 
   void *attributes
  );

/* Routine to sort the groups - must be called before traversal. */
int CCTKi_DoScheduleSortAllGroups(void);

/* Traversal routine */
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 (*function_process)(void *, void *, void *),
                             void *data);

#ifdef __cplusplus
}
#endif

#endif /* _CCTKI_SCHEDULE_H_ */