From 831578c0a84f6e560c221ec4a077ae9edba06788 Mon Sep 17 00:00:00 2001 From: hh1 Date: Mon, 6 Dec 2004 18:05:34 +0000 Subject: *** empty log message *** --- examples/Group_Schedule/simple/scenarioa.cpp | 88 ++++++++++++++-------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/Group_Schedule/simple/scenarioa.cpp b/examples/Group_Schedule/simple/scenarioa.cpp index ad24a307fad..b93f634fd9a 100644 --- a/examples/Group_Schedule/simple/scenarioa.cpp +++ b/examples/Group_Schedule/simple/scenarioa.cpp @@ -45,70 +45,70 @@ void my_sleep(int secs){ void child_process(SchedGroup& grp, const char* process_name) { - DSTRM_EVENT(SCENARIOA_FAM, JOINING_GROUP, getpid(), 0, NULL); - Seq_QoS qos; - SchedThread thr_member(&grp, qos, process_name); + DSTRM_EVENT(SCENARIOA_FAM, JOINING_GROUP, getpid(), 0, NULL); + Seq_QoS qos; + SchedThread thr_member(&grp, qos, process_name); - if(!thr_member.is_valid()){ + if(!thr_member.is_valid()){ printf("Error! in join_grp\n"); return; - } - + } + - for (int k = 0; k < 3; ++k) { - DSTRM_EVENT(SCENARIOA_FAM,IN_WHILE_LOOP, getpid(), 0, NULL); + for (int k = 0; k < 3; ++k) { + DSTRM_EVENT(SCENARIOA_FAM,IN_WHILE_LOOP, getpid(), 0, NULL); int j; - for(int i=0; i<100000; i++) - j++; - + for(int i=0; i<100000; i++) + j++; + DSTRM_EVENT(SCENARIOA_FAM, CALLING_SLEEP, getpid(), 0, NULL); - my_sleep(2); - DSTRM_EVENT(SCENARIOA_FAM, AFTER_SLEEP, getpid(), 0, NULL); - } - + my_sleep(2); + DSTRM_EVENT(SCENARIOA_FAM, AFTER_SLEEP, getpid(), 0, NULL); + } + DSTRM_EVENT(SCENARIOA_FAM, EXITING, getpid(), 0, NULL); - return; + return; } int main(int argc, char **argv){ - int pid=0, num_processes=0; + int pid=0, num_processes=0; - if(argc!=3){ - printf("usage\n"); - printf("scenarioa \n"); - exit(0); - } + if(argc!=3){ + printf("usage\n"); + printf("scenarioa \n"); + exit(0); + } - num_processes=atoi(argv[2]); - - Seq_QoS qos; - - SchedGroup top_group("SS", qos); - - if (top_group.set_as_top() == -1) { - fprintf (stderr, "Error in setting top group\n"); - exit(1); - } + num_processes=atoi(argv[2]); + + Seq_QoS qos; + + SchedGroup top_group("SS", qos); + + if (top_group.set_as_top() == -1) { + fprintf (stderr, "Error in setting top group\n"); + exit(1); + } - DSUI_INIT("scenarioa", "scenarioa_enable.dsui"); + DSUI_INIT("scenarioa", "scenarioa_enable.dsui"); - for(int i=0;i