diff options
author | yfzhang <yfzhang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-12-03 07:42:20 +0000 |
---|---|---|
committer | yfzhang <yfzhang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-12-03 07:42:20 +0000 |
commit | 166440f8680ddd2c94118c6c0f4b908470005262 (patch) | |
tree | 0b4273b4241283358258db2bf3a9d74ade28a0bd | |
parent | 42ca46774e784cc235a967f8b171c270fc83f745 (diff) | |
download | ATCD-166440f8680ddd2c94118c6c0f4b908470005262.tar.gz |
correct 1000 oneway call for DT
-rw-r--r-- | TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp index 242ddff9867..b0dccca19f8 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp @@ -20,8 +20,8 @@ int do_shutdown = 1; int enable_dynamic_scheduling = 1; int enable_yield = 1; int niteration = 1000; -int workload = 30; -int period = 50; +int workload = 1; +int period = 2; class Worker : public ACE_Task_Base { @@ -62,7 +62,7 @@ private: int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "ks:n:w:p"); + ACE_Get_Opt get_opts (argc, argv, "k:sn:w:p:"); int c; while ((c = get_opts ()) != -1) @@ -248,7 +248,7 @@ main (int argc, char *argv[]) scheduler, deadline, importance, - 30, + workload, 1); if (worker1.activate (flags, 1, 0, max_prio) != 0) @@ -391,8 +391,6 @@ Worker::svc (void) ACE_DEBUG ((LM_DEBUG, "(%t|%T) worker activated with prio %d\n", prio)); - for (int i=0; i<niteration; i++) - { if (enable_dynamic_scheduling) { EDF_Scheduling::SchedulingParameter sched_param; @@ -419,6 +417,8 @@ Worker::svc (void) ACE_DEBUG ((LM_DEBUG, "(%t|%T):after begin_sched_segment\n")); } + for(int i=0; i<niteration; i++) + { /* MEASURE: One way call start */ DSUI_EVENT_LOG (WORKER_GROUP_FAM, ONE_WAY_CALL_START, 1, 0, NULL); ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to make one way call\n")); @@ -430,16 +430,15 @@ Worker::svc (void) /* MEASURE: One way call done */ DSUI_EVENT_LOG (WORKER_GROUP_FAM, ONE_WAY_CALL_DONE, m_id, 0, NULL); ACE_DEBUG ((LM_DEBUG, "(%t|%T):one way call done\n")); - + + ACE_OS::sleep(period); + } if (enable_dynamic_scheduling) { scheduler_current_->end_scheduling_segment (name); ACE_CHECK_RETURN (-1); } - ACE_OS::sleep(period); - } - ACE_DEBUG ((LM_DEBUG, "client worker thread (%t) done\n")); return 0; |