diff options
author | storri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-31 15:49:08 +0000 |
---|---|---|
committer | storri <storri@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-31 15:49:08 +0000 |
commit | 642771dd776103ae53a2c1b358d82faccfdafd27 (patch) | |
tree | 136d1136efa2c9b818c31f3ff97cac2b990135a7 /TAO/examples/Kokyu_dsrt_schedulers | |
parent | 158acd793d530c273787e7e233306867aa6b9dd7 (diff) | |
download | ATCD-642771dd776103ae53a2c1b358d82faccfdafd27.tar.gz |
These files should have not been commited to the HEAD.
Diffstat (limited to 'TAO/examples/Kokyu_dsrt_schedulers')
37 files changed, 0 insertions, 4001 deletions
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile deleted file mode 100644 index e967cb55981..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU ACE Workspace -# -# @file Makefile -# -# $Id$ -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- - - -MAKE_OPTIONS=$(shell echo $(MAKEFLAGS) | sed 's/--unix *//; s/ .*//') -ifeq ($(findstring k,$(MAKE_OPTIONS)),k) - KEEP_GOING = 1 -else - KEEP_GOING = 0 -endif - -%.tgt0: -ifeq ($(KEEP_GOING),1) -# -@$(MAKE) -f Makefile.dt_oneway_client -C . $(*); - -@$(MAKE) -f Makefile.dt_two_prio_client -C . $(*); -# -@$(MAKE) -f Makefile.dt_prio_client -C . $(*); -# -@$(MAKE) -f Makefile.dt_twoway_client -C . $(*); -else -# @$(MAKE) -f Makefile.dt_oneway_client -C . $(*); - @$(MAKE) -f Makefile.dt_two_prio_client -C . $(*); -# @$(MAKE) -f Makefile.dt_prio_client -C . $(*); -# @$(MAKE) -f Makefile.dt_twoway_client -C . $(*); -endif -%.tgt1: %.tgt0 -ifeq ($(KEEP_GOING),1) -# -@$(MAKE) -f Makefile.dt_oneway_server -C . $(*); - -@$(MAKE) -f Makefile.dt_two_prio_server -C . $(*); -# -@$(MAKE) -f Makefile.dt_prio_server -C . $(*); -# -@$(MAKE) -f Makefile.dt_twoway_server -C . $(*); -else -# @$(MAKE) -f Makefile.dt_oneway_server -C . $(*); - @$(MAKE) -f Makefile.dt_two_prio_server -C . $(*); -# @$(MAKE) -f Makefile.dt_prio_server -C . $(*); -# @$(MAKE) -f Makefile.dt_twoway_server -C . $(*); -endif - - -all: all.tgt0 all.tgt1 - -debug: debug.tgt0 debug.tgt1 - -profile: profile.tgt0 profile.tgt1 - -optimize: optimize.tgt0 optimize.tgt1 - -install: install.tgt0 install.tgt1 - -deinstall: deinstall.tgt0 deinstall.tgt1 - -clean: clean.tgt0 clean.tgt1 - -realclean: realclean.tgt0 realclean.tgt1 - -clobber: clobber.tgt0 clobber.tgt1 - -depend: depend.tgt0 depend.tgt1 - -rcs_info: rcs_info.tgt0 rcs_info.tgt1 - -idl_stubs: idl_stubs.tgt0 idl_stubs.tgt1 diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.backup b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.backup deleted file mode 100644 index 85f19ac396d..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.backup +++ /dev/null @@ -1,61 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU ACE Workspace -# -# @file Makefile -# -# Makefile,v 1.3 2003/10/17 16:37:52 venkita Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- - - -MAKE_OPTIONS=$(shell echo $(MAKEFLAGS) | sed 's/--unix *//; s/ .*//') -ifeq ($(findstring k,$(MAKE_OPTIONS)),k) - KEEP_GOING = 1 -else - KEEP_GOING = 0 -endif - -%.tgt0: -ifeq ($(KEEP_GOING),1) - -@$(MAKE) -f Makefile.prio_client -C . $(*); - -@$(MAKE) -f Makefile.twoway_client -C . $(*); -else - @$(MAKE) -f Makefile.prio_client -C . $(*); - @$(MAKE) -f Makefile.twoway_client -C . $(*); -endif -%.tgt1: %.tgt0 -ifeq ($(KEEP_GOING),1) - -@$(MAKE) -f Makefile.prio_server -C . $(*); - -@$(MAKE) -f Makefile.twoway_server -C . $(*); -else - @$(MAKE) -f Makefile.prio_server -C . $(*); - @$(MAKE) -f Makefile.twoway_server -C . $(*); -endif - - -all: all.tgt0 all.tgt1 - -debug: debug.tgt0 debug.tgt1 - -profile: profile.tgt0 profile.tgt1 - -optimize: optimize.tgt0 optimize.tgt1 - -install: install.tgt0 install.tgt1 - -deinstall: deinstall.tgt0 deinstall.tgt1 - -clean: clean.tgt0 clean.tgt1 - -realclean: realclean.tgt0 realclean.tgt1 - -clobber: clobber.tgt0 clobber.tgt1 - -depend: depend.tgt0 depend.tgt1 - -rcs_info: rcs_info.tgt0 rcs_info.tgt1 - -idl_stubs: idl_stubs.tgt0 idl_stubs.tgt1 diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_client b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_client deleted file mode 100644 index 634a4802de7..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_client +++ /dev/null @@ -1,128 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.dt_oneway_client -# -# gnu.mpd,v 1.56 2003/10/16 14:03:48 elliott_c Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_oneway_client -DEPENDENCY_FILE = .depend.Makefile.dt_oneway_client -BIN_UNCHECKED = dt_oneway_client - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test1 -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - test1C \ - dt_oneway_client - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lTAO_Svc_Utils -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -ldsui -lTAO_RTCORBA -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/dt_oneway_client - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test1 -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs) -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -test1C.cpp dt_oneway_client.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../../orbsvcs -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif - -CPPFLAGS += -DKOKYU_DSRT_LOGGING - -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - -DSUI_PARSE=$(DATASTREAM_ROOT)/bin/dsui-parse -DT_ONEWAY_DSUI = dt_oneway_dsui_families.h dt_oneway_dsui_info.h dt_oneway_dsui_table.h -$(DT_ONEWAY_DSUI): dt_oneway.dsui - $(DSUI_PARSE) -n dt_oneway.dsui -t dt_oneway - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -$(RM) $(DT_ONEWAY_DSUI) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_server b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_server deleted file mode 100644 index dda5edfb535..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_oneway_server +++ /dev/null @@ -1,125 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.dt_oneway_server -# -# gnu.mpd,v 1.56 2003/10/16 14:03:48 elliott_c Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_oneway_server -DEPENDENCY_FILE = .depend.Makefile.dt_oneway_server -BIN_UNCHECKED = dt_oneway_server - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test1 -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - test1C \ - test1S \ - test1_i \ - dt_oneway_server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -ldsui -lTAO_RTCORBA -lTAO_PortableServer -lTAO_IORInterceptor -lTAO_Valuetype -lTAO_ObjRefTemplate -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/dt_oneway_server - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test1 -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -test1C.cpp testi1S.cpp test1_i.cpp dt_oneway_server.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include - -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif - -CPPFLAGS += -DKOKYU_DSRT_LOGGING - -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Gv -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_client b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_client deleted file mode 100644 index a74085fcc70..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_client +++ /dev/null @@ -1,122 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.dt_prio_client -# -# $Id$ -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_prio_client -DEPENDENCY_FILE = .depend.Makefile.dt_prio_client -BIN_UNCHECKED = dt_prio_client - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - testC \ - dt_prio_client - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lTAO_Svc_Utils -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -ldsui -lTAO_RTCORBA -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/dt_prio_client - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs) -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -testC.cpp dt_prio_client.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../../orbsvcs -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif - -CPPFLAGS += -DKOKYU_DSRT_LOGGING -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_server b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_server deleted file mode 100644 index 61f7e382ed7..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_prio_server +++ /dev/null @@ -1,123 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.prio_server -# -# gnu.mpd,v 1.56 2003/10/16 14:03:48 elliott_c Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_prio_server -DEPENDENCY_FILE = .depend.Makefile.dt_prio_server -BIN_UNCHECKED = dt_prio_server - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - testC \ - testS \ - test_i \ - dt_prio_server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -ldsui -lTAO_RTCORBA -lTAO_PortableServer -lTAO_IORInterceptor -lTAO_Valuetype -lTAO_ObjRefTemplate -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/prio_server - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -testC.cpp testS.cpp test_i.cpp prio_server.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif -CPPFLAGS += -DKOKYU_DSRT_LOGGING - -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Gv -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_client b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_client deleted file mode 100644 index aecbf591ef9..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_client +++ /dev/null @@ -1,122 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.dt_twoway_client -# -# gnu.mpd,v 1.56 2003/10/16 14:03:48 elliott_c Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_twoway_client -DEPENDENCY_FILE = .depend.Makefile.dt_twoway_client -BIN_UNCHECKED = dt_twoway_client - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - testC \ - dt_twoway_client - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lTAO_Svc_Utils -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -ldsui -lTAO_RTCORBA -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/dt_twoway_client - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -CURRENT_COMPONENTS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs) -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -testC.cpp dt_twoway_client.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../../orbsvcs -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif - - -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_server b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_server deleted file mode 100644 index 8f52893ebd5..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/Makefile.dt_twoway_server +++ /dev/null @@ -1,123 +0,0 @@ -#---------------------------------------------------------------------------- -# GNU Makefile -# -# @file Makefile.dt_twoway_server -# -# gnu.mpd,v 1.56 2003/10/16 14:03:48 elliott_c Exp -# -# This file was automatically generated by MPC. Any changes made directly to -# this file will be lost the next time it is generated. -# -#---------------------------------------------------------------------------- -MAKEFILE = Makefile.dt_twoway_server -DEPENDENCY_FILE = .depend.Makefile.dt_twoway_server -BIN_UNCHECKED = dt_twoway_server - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif -ifndef CIAO_ROOT - CIAO_ROOT = $(TAO_ROOT)/CIAO -endif - -TAO_IDL = ../../../../bin/tao_idl -IDL_FILES = test -IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) - -FILES = \ - testC \ - testS \ - test_i \ - dt_twoway_server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- -LDLIBS = -lKokyu_DSRT_Schedulers -lTAO_RTScheduler -lwrappers -lKokyu -dsui -lTAO_RTCORBA -lTAO_PortableServer -lTAO_IORInterceptor -lTAO_Valuetype -lTAO_ObjRefTemplate -lTAO -lACE -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -## We don't need the ACELIB setting from wrapper_macros.GNU -ACELIB = -include $(TAO_ROOT)/rules.tao.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to have a template directory per project. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -TEMPINCDIR := $(TEMPINCDIR)/dt_twoway_server - -all: $(TEMPINCDIR) - -$(TEMPINCDIR): - @-test -d $(TEMPINCDIR) || mkdir -p $(TEMPINCDIR) $(ACE_NUL_STDERR) - -endif - -ifeq ($(rt_corba),1) -BIN = $(BIN_UNCHECKED) -else - all: require_warning -endif - -OBJS = $(addsuffix .o, $(notdir $(FILES))) -SRC = $(addsuffix .cpp, $(FILES)) - -ifneq ($(BIN),) -all: idl_stubs - -# This rule forces make to run the idl_stubs -# target before building any of the source files. -testC.cpp testS.cpp test_i.cpp dt_twoway_server.cpp: idl_stubs -endif - -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU - -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -CPPFLAGS += -I../../../examples/Kokyu_dsrt_schedulers -I../../../../Kokyu -I../../.. -I../../../tao -I../../../.. -I$(DATASTREAM_ROOT)/include -ifeq ($(static_libs),1) - ifneq ($(LIB),) - CPPFLAGS += -DTAO_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS -DACE_AS_STATIC_LIBS - endif -endif - - -LDFLAGS += -L../../../../lib -L$(DATASTREAM_ROOT)/lib - -TAO_IDLFLAGS += -Gv -Ge 1 -Sc -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- -require_warning: - @echo This project will not be built due to one of the following missing features: - @echo rt_corba - -../../../../lib: - -@mkdir -p "../../../../lib" - - -ADDITIONAL_IDL_TARGETS = -# IDL File Directory: . - -ifneq ($(ADDITIONAL_IDL_TARGETS),) -idl_stubs: $(ADDITIONAL_IDL_TARGETS) -endif - -.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) - -ifndef kylix -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) -else -$(BIN): $(addprefix $(VDIR), $(OBJS)) - $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, -endif - -realclean: clean - -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) -ifneq ($(GENERATED_DIRTY),) - -$(RM) -r $(GENERATED_DIRTY) -endif - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway.dsui b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway.dsui deleted file mode 100644 index 6ae4abe310a..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway.dsui +++ /dev/null @@ -1,23 +0,0 @@ -# TEST_ONE -DSTRM_EVENT TEST_ONE 3 DEADLINE_MISSED 2 "Deadline missed" print_string -DSTRM_EVENT TEST_ONE 3 STOP_SERVICE 1 "Stop service time" print_string -DSTRM_EVENT TEST_ONE 3 START_SERVICE 0 "Start service time" print_string - -# WORKER GROUP -DSTRM_EVENT WORKER_GROUP 2 ONE_WAY_CALL_DONE 4 "One way call done" print_string -DSTRM_EVENT WORKER_GROUP 2 ONE_WAY_CALL_START 3 "One way call started" print_string -DSTRM_EVENT WORKER_GROUP 2 END_SCHED_SEGMENT 2 "End scheduling segment" print_string -DSTRM_EVENT WORKER_GROUP 2 BEGIN_SCHED_SEGMENT 1 "Start scheduling segment" print_string -DSTRM_EVENT WORKER_GROUP 2 WORKER_STARTED 0 "Start worker thread" print_string - - -# MAIN GROUP -DSTRM_EVENT MAIN_GROUP 1 SCHEDULER_STARTED 8 "Scheduler started" print_string -DSTRM_EVENT MAIN_GROUP 1 SCHEDULER_SHUTDOWN 7 "Scheduler stopped" print_string -DSTRM_EVENT MAIN_GROUP 1 AFTER_SERVER_SHUTDOWN 6 "Server shutdown complete" print_string -DSTRM_EVENT MAIN_GROUP 1 CALL_SERVER_SHUTDOWN 5 "Called server to shutdown" print_string -DSTRM_EVENT MAIN_GROUP 1 WORKER_WAIT_DONE 4 "Worker thread wait() call complete" print_string -DSTRM_EVENT MAIN_GROUP 1 WORKER_ACTIVATED 3 "Worker activated" print_string -DSTRM_EVENT MAIN_GROUP 1 SCHEDULE_SETUP 2 "Scheduler setup" print_string -DSTRM_EVENT MAIN_GROUP 1 STOP 1 "Stop program" print_string -DSTRM_EVENT MAIN_GROUP 1 START 0 "Start program" print_string 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 deleted file mode 100644 index 04fe87841b1..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_client.cpp +++ /dev/null @@ -1,465 +0,0 @@ -//$Id$ - -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/High_Res_Timer.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "test1C.h" -#include "EDF_Scheduler.h" -#include "orbsvcs/orbsvcs/Time_Utilities.h" -#include "Task_Stats.h" - -#include "dt_oneway_config.h" -#include "dt_oneway_dsui_families.h" -#include <dsui.h> - -ACE_RCSID(MT_Server, client, "client.cpp,v 1.2 2003/10/08 13:26:32 venkita Exp") - -const char *ior = "file://test1.ior"; -int do_shutdown = 1; -int enable_dynamic_scheduling = 1; -int enable_yield = 1; -int enable_rand = 0; -int niteration = 1000; -int workload = 1; -int period = 2; - -class Worker : public ACE_Task_Base -{ - // = TITLE - // Run a server thread - // - // = DESCRIPTION - // Use the ACE_Task_Base class to run server threads - // -public: - Worker (CORBA::ORB_ptr orb, - Simple_Server1_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load, - int worker_id); - // ctor - - virtual int svc (void); - // The thread entry point. - -private: - CORBA::ORB_var orb_; - // The orb - - Simple_Server1_var server_; - RTScheduling::Current_var scheduler_current_; - EDF_Scheduler* scheduler_; - TimeBase::TimeT deadline_; - long importance_; - CORBA::Long server_load_; - int sleep_time_; - unsigned int m_id; -}; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "k:sn:w:p:r"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = get_opts.opt_arg (); - break; - - case 's': - enable_yield = 0; - break; - - case 'n': - niteration = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'w': - workload = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'p': - period = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'r': - enable_rand = 1; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-k <ior> " - "-s (disable yield)" - "-n <niterations>" - "-w <workload>" - "-p <period>" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - ds_control ds_cntrl ("DT_Oneway", "dt_oneway_enable.dsui"); - ACE_High_Res_Timer non_dsui_timer; - non_dsui_timer.calibrate (); - non_dsui_timer.start(); - - /* MEASURE: Program start time */ - DSUI_EVENT_LOG(MAIN_GROUP_FAM, START,1,0,NULL); - - EDF_Scheduler* scheduler=0; - RTScheduling::Current_var current; - int prio; - int max_prio; - ACE_Sched_Params::Policy sched_policy = ACE_SCHED_RR; - int sched_scope = ACE_SCOPE_THREAD; - long flags; - - if (sched_policy == ACE_SCHED_RR) { - /* MEASURE (DP): Schedule policy */ - char* policy = "ACE_SCHED_RR"; - DSUI_EVENT_LOG (MAIN_GROUP_FAM, SCHEDULE_SETUP, 1, strlen (policy), policy); - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_RR; - } - else { - /* MEASURE (DP): Schedule policy */ - char* policy = "ACE_SCHED_FIFO"; - DSUI_EVENT_LOG (MAIN_GROUP_FAM, SCHEDULE_SETUP, 1, strlen (policy), policy); - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_FIFO; - } - - ACE_hthread_t main_thr_handle; - ACE_Thread::self (main_thr_handle); - - max_prio = ACE_Sched_Params::priority_max (sched_policy, - sched_scope); - - ACE_Sched_Params sched_params (sched_policy, max_prio); - - ACE_OS::sched_params (sched_params); - - if (ACE_Thread::getprio (main_thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t): main thread prio is %d\n", prio)); - - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Simple_Server1_var server = - Simple_Server1::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Object reference <%s> is nil\n", - ior), - 1); - } - - if (enable_dynamic_scheduling) - { - ACE_DEBUG ((LM_DEBUG, "Dyn Sched enabled\n")); - CORBA::Object_ptr manager_obj = - orb->resolve_initial_references ("RTSchedulerManager" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - TAO_RTScheduler_Manager_var manager = - TAO_RTScheduler_Manager::_narrow (manager_obj - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type; - if (enable_yield) - { - disp_impl_type = Kokyu::DSRT_CV_BASED; - } - else - { - disp_impl_type = Kokyu::DSRT_OS_BASED; - } - - ACE_NEW_RETURN (scheduler, - EDF_Scheduler (orb.in (), - disp_impl_type, - sched_policy, - sched_scope), -1); - - /* MEASURE: Scheduler start time */ - DSUI_EVENT_LOG (MAIN_GROUP_FAM, SCHEDULER_STARTED, 1, 0, NULL); - - manager->rtscheduler (scheduler); - - CORBA::Object_var object = - orb->resolve_initial_references ("RTScheduler_Current" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - current = - RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - } - - TimeBase::TimeT deadline; - int importance=0; - - ORBSVCS_Time::Time_Value_to_TimeT (deadline, - ACE_OS::gettimeofday () + - ACE_Time_Value (50,0) ); - - Worker worker1 (orb.in (), - server.in (), - current.in (), - scheduler, - deadline, - importance, - workload, - 1); - - if (worker1.activate (flags, 1, 0, max_prio) != 0) - { - ACE_ERROR ((LM_ERROR, - "(%t|%T) cannot activate worker thread.\n")); - } - - /* MEASURE: Worker thread activated */ - DSUI_EVENT_LOG (MAIN_GROUP_FAM, WORKER_ACTIVATED, 1, 0, NULL); - - worker1.wait (); - - /* MEASURE: Wait for worker thread done in main thread */ - // char* msg = "(%t): wait for worker threads done in main thread\n"; - // Get thread id - // DSUI_EVENT_LOG (MAIN_GROUP_FAM, WORKER_WAIT_DONE, 1, strlen(msg), msg); - - ACE_DEBUG ((LM_DEBUG, - "(%t): wait for worker threads done in main thread\n")); - - if (do_shutdown) - { - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - sched_param.importance = 0; - sched_param.deadline = 0; - sched_param.task_id = ID_BEGIN++; - sched_param.period = 0; - CORBA::Policy_var sched_param_policy = - scheduler->create_scheduling_parameter (sched_param); - CORBA::Policy_ptr implicit_sched_param = 0; - current->begin_scheduling_segment (0, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_DEBUG ((LM_DEBUG, "(%t): about to call server shutdown\n")); - - /* MEASURE: Call to shutdown server */ - // char* msg = "(%t): wait for worker threads done in main thread\n"; - // Get thread id - DSUI_EVENT_LOG (MAIN_GROUP_FAM, CALL_SERVER_SHUTDOWN, 1, 0, NULL); - - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - /* MEASURE: After call to server shutdown */ - DSUI_EVENT_LOG (MAIN_GROUP_FAM, AFTER_SERVER_SHUTDOWN, 1, 0, NULL); - ACE_DEBUG ((LM_DEBUG, "after shutdown call in main thread\n")); - - - if (enable_dynamic_scheduling) - { - current->end_scheduling_segment (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - - scheduler->shutdown (); - - /* MEASURE: Scheduler stop time */ - DSUI_EVENT_LOG (MAIN_GROUP_FAM, SCHEDULER_SHUTDOWN, 1, 0, NULL); - ACE_DEBUG ((LM_DEBUG, "scheduler shutdown done\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - /* MEASURE: Program stop time */ - DSUI_EVENT_LOG(MAIN_GROUP_FAM, STOP, 1, 0, NULL); - - non_dsui_timer.stop(); - ACE_hrtime_t dsui_ovhd_time; - non_dsui_timer.elapsed_time (dsui_ovhd_time); - - ACE_OS::printf ( ACE_TEXT ("Elapsed time: %lu (nsec)\n"), dsui_ovhd_time); - return 0; -} - -// **************************************************************** - -Worker::Worker (CORBA::ORB_ptr orb, - Simple_Server1_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load, - int worker_id) - : orb_ (CORBA::ORB::_duplicate (orb)), - server_ (Simple_Server1::_duplicate (server_ptr)), - scheduler_current_ (RTScheduling::Current::_duplicate (current)), - scheduler_ (scheduler), - deadline_ (deadline), - importance_ (importance), - server_load_ (server_load), - m_id (worker_id) - // sleep_time_ (sleep_time) -{ -} - -int -Worker::svc (void) -{ - /* MEASURE: Worker start time */ - DSUI_EVENT_LOG (WORKER_GROUP_FAM, WORKER_STARTED, m_id, 0, NULL); - - ACE_DECLARE_NEW_CORBA_ENV; - const char * name = 0; - /* - ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to sleep for %d sec\n", sleep_time_)); - ACE_OS::sleep (sleep_time_); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):woke up from sleep for %d sec\n", sleep_time_)); - */ - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t|%T) worker activated with prio %d\n", prio)); - - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - CORBA::Policy_var sched_param_policy; - sched_param.importance = importance_; - sched_param.deadline = deadline_; - sched_param.period = period*10000000; - sched_param.task_id = ID_BEGIN++; - sched_param_policy = scheduler_->create_scheduling_parameter (sched_param); - - //If we do not define implicit_sched_param, the new spawned DT will have the default lowest prio. - CORBA::Policy_var implicit_sched_param = sched_param_policy; - - /* MEASURE: Start of scheduling segment */ - DSUI_EVENT_LOG (WORKER_GROUP_FAM, BEGIN_SCHED_SEGMENT, 1, 0, NULL); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):before begin_sched_segment\n")); - - scheduler_current_->begin_scheduling_segment (name, - sched_param_policy.in (), - implicit_sched_param.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - /* MEASURE: End of scheduling segment */ - DSUI_EVENT_LOG (WORKER_GROUP_FAM, END_SCHED_SEGMENT, 1, 0, NULL); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):after begin_sched_segment\n")); - } - - int rand; - 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")); - // TAO_debug_level = 1; - server_->test_method (server_load_ ACE_ENV_ARG_PARAMETER); - - ACE_CHECK_RETURN (-1); - - /* 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")); - - rand = mrand48()/10000; - if(enable_rand) - { - usleep(period*1000000+rand); - ACE_DEBUG((LM_DEBUG,"NOW I AM GOING TO SLEEP FOR %d\n", period*1000000+rand)); - } - else - { - sleep(period); - ACE_DEBUG((LM_DEBUG,"NOW I AM GOING TO SLEEP FOR %d\n", period*1000000)); - } - } - if (enable_dynamic_scheduling) - { - scheduler_current_->end_scheduling_segment (name); - ACE_CHECK_RETURN (-1); - } - - ACE_DEBUG ((LM_DEBUG, "client worker thread (%t) done\n")); - - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_config.h b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_config.h deleted file mode 100644 index 62a15f13b6d..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_config.h +++ /dev/null @@ -1,9 +0,0 @@ -/* $Id$ */ -#ifndef DT_ONEWAY_CONFIG_H -#define DT_ONEWAY_CONFIG_H - -#define CONFIG_DSTREAM_MAIN_GROUP -#define CONFIG_DSTREAM_WORKER_GROUP -#define CONFIG_DSTREAM_TEST_ONE - -#endif /* DT_ONEWAY_CONFIG_H */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_enable.dsui b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_enable.dsui deleted file mode 100644 index 2c2a3037d4e..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_oneway_enable.dsui +++ /dev/null @@ -1,48 +0,0 @@ -# DSRT DIRECT Dispatcher (DSRT_DIRECT_Dispatcher_Impl_T.cpp) -DSTRM_EVENT DSRT_DIRECT_DISPATCH 7 SCHEDULE_EXIT 1 -DSTRM_EVENT DSRT_DIRECT_DISPATCH 7 SCHEDULE_ENTER 0 - -# DSRT CV Dispatcher (DSRT_CV_Dispatcher_Impl_T.cpp) -DSTRM_EVENT DSRT_CV_DISPATCH 6 SCHEDULE_EXIT 1 -DSTRM_EVENT DSRT_CV_DISPATCH 6 SCHEDULE_ENTER 0 - -# DSRT_Dispatcher -DSTRM_EVENT DSRT_DISPATCH 5 SCHEDULE 0 - -# EDF_SCHED -DSTRM_EVENT EDF_SCHED 4 LEAVE_SERVER_DISPATCH_SCHEDULE 12 -DSTRM_EVENT EDF_SCHED 4 ENTER_SERVER_DISPATCH_SCHEDULE 11 -DSTRM_EVENT EDF_SCHED 4 LEAVE_SERVER_SCHED_TIME 10 -DSTRM_EVENT EDF_SCHED 4 ENTER_SERVER_SCHED_TIME 9 -DSTRM_EVENT EDF_SCHED 4 LEAVE_CLIENT_SCHED_TIME 8 -DSTRM_EVENT EDF_SCHED 4 LEAVE_KOKYU_DISPATCH_UPDATE_SCHEDULE 7 -DSTRM_EVENT EDF_SCHED 4 CALL_KOKYU_DISPATCH_UPDATE_SCHEDULE 6 -DSTRM_EVENT EDF_SCHED 4 ENTER_CLIENT_SCHED_TIME 5 -DSTRM_EVENT EDF_SCHED 4 DISPATCHER_SHUTDOWN 4 -DSTRM_EVENT EDF_SCHED 4 CREATE_SCHED_PARAM 3 -DSTRM_EVENT EDF_SCHED 4 BEGIN_SCHED_SEGMENT 2 -DSTRM_EVENT EDF_SCHED 4 END_SCHED_SEGMENT 1 -DSTRM_EVENT EDF_SCHED 4 KOKYU_SCHED_START 0 - -# TEST_ONE -DSTRM_EVENT TEST_ONE 3 DEADLINE_MISSED 2 -DSTRM_EVENT TEST_ONE 3 STOP_SERVICE 1 -DSTRM_EVENT TEST_ONE 3 START_SERVICE 0 - -# WORKER GROUP -DSTRM_EVENT WORKER_GROUP 2 ONE_WAY_CALL_DONE 4 -DSTRM_EVENT WORKER_GROUP 2 ONE_WAY_CALL_START 3 -DSTRM_EVENT WORKER_GROUP 2 END_SCHED_SEGMENT 2 -DSTRM_EVENT WORKER_GROUP 2 BEGIN_SCHED_SEGMENT 1 -DSTRM_EVENT WORKER_GROUP 2 WORKER_STARTED 0 - -# MAIN GROUP -DSTRM_EVENT MAIN_GROUP 1 SCHEDULER_STARTED 8 -DSTRM_EVENT MAIN_GROUP 1 SCHEDULER_SHUTDOWN 7 -DSTRM_EVENT MAIN_GROUP 1 AFTER_SERVER_SHUTDOWN 6 -DSTRM_EVENT MAIN_GROUP 1 CALL_SERVER_SHUTDOWN 5 -DSTRM_EVENT MAIN_GROUP 1 WORKER_WAIT_DONE 4 -DSTRM_EVENT MAIN_GROUP 1 WORKER_ACTIVATED 3 -DSTRM_EVENT MAIN_GROUP 1 SCHEDULE_SETUP 2 -DSTRM_EVENT MAIN_GROUP 1 STOP 1 -DSTRM_EVENT MAIN_GROUP 1 START 0 diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_client.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_client.cpp deleted file mode 100644 index e75d39909d1..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_client.cpp +++ /dev/null @@ -1,384 +0,0 @@ -//$Id$ - -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/High_Res_Timer.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "testC.h" -#include "EDF_Scheduler.h" -#include "orbsvcs/orbsvcs/Time_Utilities.h" - -ACE_RCSID(MT_Server, client, "client.cpp,v 1.2 2003/10/08 13:26:32 venkita Exp") - -const char *ior = "file://test.ior"; -int niterations = 5; -int do_shutdown = 1; -int enable_dynamic_scheduling = 1; -int enable_yield = 1; - -class Worker : public ACE_Task_Base -{ - // = TITLE - // Run a server thread - // - // = DESCRIPTION - // Use the ACE_Task_Base class to run server threads - // -public: - Worker (CORBA::ORB_ptr orb, - Simple_Server_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load); - // int sleep_time); - // ctor - - virtual int svc (void); - // The thread entry point. - -private: - CORBA::ORB_var orb_; - // The orb - - Simple_Server_var server_; - RTScheduling::Current_var scheduler_current_; - EDF_Scheduler* scheduler_; - TimeBase::TimeT deadline_; - long importance_; - CORBA::Long server_load_; - int sleep_time_; -}; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "xk:i:s"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'x': - do_shutdown = 1; - break; - - case 'k': - ior = get_opts.opt_arg (); - break; - - case 'i': - niterations = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 's': - enable_yield = 0; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-k <ior> " - "-i <niterations> " - "-d (enable dynamic scheduling)" - "-s (disable yield)" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - EDF_Scheduler* scheduler=0; - RTScheduling::Current_var current; - int prio; - int max_prio; - ACE_Sched_Params::Policy sched_policy = ACE_SCHED_RR; - int sched_scope = ACE_SCOPE_THREAD; - long flags; - - if (sched_policy == ACE_SCHED_RR) - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_RR; - else - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_FIFO; - - ACE_hthread_t main_thr_handle; - ACE_Thread::self (main_thr_handle); - - max_prio = ACE_Sched_Params::priority_max (sched_policy, - sched_scope); - - ACE_Sched_Params sched_params (sched_policy, max_prio); - - ACE_OS::sched_params (sched_params); - - if (ACE_Thread::getprio (main_thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t): main thread prio is %d\n", prio)); - - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Simple_Server_var server = - Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Object reference <%s> is nil\n", - ior), - 1); - } - - if (enable_dynamic_scheduling) - { - ACE_DEBUG ((LM_DEBUG, "Dyn Sched enabled\n")); - CORBA::Object_ptr manager_obj = - orb->resolve_initial_references ("RTSchedulerManager" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - TAO_RTScheduler_Manager_var manager = - TAO_RTScheduler_Manager::_narrow (manager_obj - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type; - if (enable_yield) - { - disp_impl_type = Kokyu::DSRT_CV_BASED; - } - else - { - disp_impl_type = Kokyu::DSRT_OS_BASED; - } - - ACE_NEW_RETURN (scheduler, - EDF_Scheduler (orb.in (), - disp_impl_type, - sched_policy, - sched_scope), -1); - - manager->rtscheduler (scheduler); - - CORBA::Object_var object = - orb->resolve_initial_references ("RTScheduler_Current" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - current = - RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - } - - TimeBase::TimeT deadline; - int importance=0; - - ORBSVCS_Time::Time_Value_to_TimeT (deadline, - ACE_OS::gettimeofday () + - ACE_Time_Value (50,0) ); - - Worker worker1 (orb.in (), - server.in (), - current.in (), - scheduler, - deadline, - importance, - 30); - - if (worker1.activate (flags, 1, 0, max_prio) != 0) - { - ACE_ERROR ((LM_ERROR, - "(%t|%T) cannot activate worker thread.\n")); - } - - ACE_OS::sleep(2); - - ORBSVCS_Time::Time_Value_to_TimeT (deadline, - ACE_OS::gettimeofday () + - ACE_Time_Value (30,0) ); - - importance = 0; - Worker worker2 (orb.in (), - server.in (), - current.in (), - scheduler, - deadline, - importance, - 10); - - if (worker2.activate (flags, 1, 0, max_prio) != 0) - { - ACE_ERROR ((LM_ERROR, - "(%t|%T) cannot activate scheduler thread in RT mode.\n")); - } - - - worker1.wait (); - worker2.wait (); - - ACE_DEBUG ((LM_DEBUG, - "(%t): wait for worker threads done in main thread\n")); - - if (do_shutdown) - { - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - sched_param.importance = 0; - sched_param.deadline = 0; - CORBA::Policy_var sched_param_policy = - scheduler->create_scheduling_parameter (sched_param); - CORBA::Policy_ptr implicit_sched_param = 0; - current->begin_scheduling_segment (0, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_DEBUG ((LM_DEBUG, "(%t): about to call server shutdown\n")); - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "after shutdown call in main thread\n")); - - - if (enable_dynamic_scheduling) - { - current->end_scheduling_segment (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - - scheduler->shutdown (); - ACE_DEBUG ((LM_DEBUG, "scheduler shutdown done\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} - -// **************************************************************** - -Worker::Worker (CORBA::ORB_ptr orb, - Simple_Server_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load) - // int sleep_time) - : orb_ (CORBA::ORB::_duplicate (orb)), - server_ (Simple_Server::_duplicate (server_ptr)), - scheduler_current_ (RTScheduling::Current::_duplicate (current)), - scheduler_ (scheduler), - deadline_ (deadline), - importance_ (importance), - server_load_ (server_load) - // sleep_time_ (sleep_time) -{ -} - -int -Worker::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - const char * name = 0; - /* - ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to sleep for %d sec\n", sleep_time_)); - ACE_OS::sleep (sleep_time_); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):woke up from sleep for %d sec\n", sleep_time_)); - */ - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t|%T) worker activated with prio %d\n", prio)); - - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - CORBA::Policy_var sched_param_policy; - sched_param.importance = importance_; - sched_param.deadline = deadline_; - sched_param_policy = scheduler_->create_scheduling_parameter (sched_param); - CORBA::Policy_ptr implicit_sched_param = 0; - ACE_DEBUG ((LM_DEBUG, "(%t|%T):before begin_sched_segment\n")); - scheduler_current_->begin_scheduling_segment (name, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):after begin_sched_segment\n")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to make two way call\n")); - server_->test_method (server_load_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):two way call done\n")); - - if (enable_dynamic_scheduling) - { - scheduler_current_->end_scheduling_segment (name); - ACE_CHECK_RETURN (-1); - } - - ACE_DEBUG ((LM_DEBUG, "client worker thread (%t) done\n")); - - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_server.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_server.cpp deleted file mode 100644 index 604167378bf..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_prio_server.cpp +++ /dev/null @@ -1,261 +0,0 @@ -//$Id$ - -#include "test_i.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/High_Res_Timer.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "EDF_Scheduler.h" -#include "Task_Stats.h" - -ACE_RCSID(MT_Server, server, "server.cpp,v 1.3 2003/10/14 05:57:01 jwillemsen Exp") - -const char *ior_output_file = "test.ior"; - -int nthreads = 3; -int enable_dynamic_scheduling = 1; -const CORBA::Short max_importance = 100; -int enable_yield = 1; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:s"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 's': - enable_yield = 0; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile>" - "-d (enable dynamic scheduling)" - "-s (disable yield)" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -class Worker : public ACE_Task_Base -{ - // = TITLE - // Run a server thread - // - // = DESCRIPTION - // Use the ACE_Task_Base class to run server threads - // -public: - Worker (CORBA::ORB_ptr orb); - // ctor - - virtual int svc (void); - // The thread entry point. - -private: - CORBA::ORB_var orb_; - // The orb -}; - -Task_Stats task_stats; - -int -main (int argc, char *argv[]) -{ - EDF_Scheduler* scheduler = 0; - RTScheduling::Current_var current; - long flags; - int sched_policy = ACE_SCHED_RR; - int sched_scope = ACE_SCOPE_THREAD; - - if (sched_policy == ACE_SCHED_RR) - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_RR; - else - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_FIFO; - - task_stats.init (100000); - - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - if (enable_dynamic_scheduling) - { - CORBA::Object_ptr manager_obj = - orb->resolve_initial_references ("RTSchedulerManager" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - TAO_RTScheduler_Manager_var manager = - TAO_RTScheduler_Manager::_narrow (manager_obj - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type; - if (enable_yield) - { - disp_impl_type = Kokyu::DSRT_CV_BASED; - } - else - { - disp_impl_type = Kokyu::DSRT_OS_BASED; - } - - ACE_NEW_RETURN (scheduler, - EDF_Scheduler (orb.in (), - disp_impl_type, - sched_policy, - sched_scope), -1); - - manager->rtscheduler (scheduler); - - CORBA::Object_var object = - orb->resolve_initial_references ("RTScheduler_Current" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - current = - RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - Simple_Server_i server_impl (orb.in (), - current.in (), - task_stats, - enable_yield); - - Simple_Server_var server = - server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); - - // If the ior_output_file exists, output the ior to it - if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG((LM_DEBUG,"(%t|%T) NOW I AM IN THE MAIN THREAD!\n")); - - Worker worker (orb.in ()); - if (worker.activate (flags, - nthreads, - 0, - ACE_Sched_Params::priority_max(sched_policy, - sched_scope)) != 0) - { - ACE_ERROR ((LM_ERROR, - "Cannot activate threads in RT class.", - "Trying to activate in non-RT class\n")); - - flags = THR_NEW_LWP | THR_JOINABLE | THR_BOUND; - if (worker.activate (flags, nthreads) != 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot activate server threads\n"), - 1); - } - } - - worker.wait (); - - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - - ACE_DEBUG ((LM_DEBUG, "shutting down scheduler\n")); - scheduler->shutdown (); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%t|%T) NOW I AM ABOUT TO EXIT MAIN!\n")); - - ACE_DEBUG ((LM_DEBUG, "Exiting main...\n")); - task_stats.dump_samples ("timeline.txt", - "Time\t\tGUID", - ACE_High_Res_Timer::global_scale_factor ()); - return 0; -} - -// **************************************************************** - -Worker::Worker (CORBA::ORB_ptr orb) - : orb_ (CORBA::ORB::_duplicate (orb)) -{ -} - -int -Worker::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_Time_Value tv(120); - - ACE_TRY - { - this->orb_->run (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - ACE_DEBUG ((LM_DEBUG, "(%t|%T): Worker thread exiting...\n")); - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_client.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_client.cpp deleted file mode 100644 index 8cf2f59104a..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_client.cpp +++ /dev/null @@ -1,356 +0,0 @@ -//$Id$ - -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/High_Res_Timer.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "testC.h" -#include "EDF_Scheduler.h" -#include "orbsvcs/orbsvcs/Time_Utilities.h" - -ACE_RCSID(MT_Server, client, "client.cpp,v 1.2 2003/10/08 13:26:32 venkita Exp") - -const char *ior = "file://test.ior"; -int do_shutdown = 0; -int enable_dynamic_scheduling = 1; -int enable_yield = 1; - -class Worker : public ACE_Task_Base -{ - // = TITLE - // Run a server thread - // - // = DESCRIPTION - // Use the ACE_Task_Base class to run server threads - // -public: - Worker (CORBA::ORB_ptr orb, - Simple_Server_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load); - // int sleep_time); - // ctor - - virtual int svc (void); - // The thread entry point. - -private: - CORBA::ORB_var orb_; - // The orb - - Simple_Server_var server_; - RTScheduling::Current_var scheduler_current_; - EDF_Scheduler* scheduler_; - TimeBase::TimeT deadline_; - long importance_; - CORBA::Long server_load_; - int sleep_time_; -}; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "xk:s"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'x': - do_shutdown = 1; - break; - - case 'k': - ior = get_opts.opt_arg (); - break; - - case 's': - enable_yield = 0; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-x (do shutdown)" - "-k <ior> " - "-s (disable yield)" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - EDF_Scheduler* scheduler=0; - RTScheduling::Current_var current; - int prio; - int max_prio; - ACE_Sched_Params::Policy sched_policy = ACE_SCHED_RR; - int sched_scope = ACE_SCOPE_THREAD; - long flags; - - if (sched_policy == ACE_SCHED_RR) - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_RR; - else - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_FIFO; - - ACE_hthread_t main_thr_handle; - ACE_Thread::self (main_thr_handle); - - max_prio = ACE_Sched_Params::priority_max (sched_policy, - sched_scope); - - ACE_Sched_Params sched_params (sched_policy, max_prio); - - ACE_OS::sched_params (sched_params); - - if (ACE_Thread::getprio (main_thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t): main thread prio is %d\n", prio)); - - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Simple_Server_var server = - Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Object reference <%s> is nil\n", - ior), - 1); - } - - if (enable_dynamic_scheduling) - { - ACE_DEBUG ((LM_DEBUG, "Dyn Sched enabled\n")); - CORBA::Object_ptr manager_obj = - orb->resolve_initial_references ("RTSchedulerManager" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - TAO_RTScheduler_Manager_var manager = - TAO_RTScheduler_Manager::_narrow (manager_obj - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type; - if (enable_yield) - { - disp_impl_type = Kokyu::DSRT_CV_BASED; - } - else - { - disp_impl_type = Kokyu::DSRT_OS_BASED; - } - - ACE_NEW_RETURN (scheduler, - EDF_Scheduler (orb.in (), - disp_impl_type, - sched_policy, - sched_scope), -1); - - manager->rtscheduler (scheduler); - - CORBA::Object_var object = - orb->resolve_initial_references ("RTScheduler_Current" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - current = - RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - } - - TimeBase::TimeT deadline; - int importance=0; - - ORBSVCS_Time::Time_Value_to_TimeT (deadline, - ACE_OS::gettimeofday () + - ACE_Time_Value (50,0) ); - - Worker worker1 (orb.in (), - server.in (), - current.in (), - scheduler, - deadline, - importance, - 30); - - if (worker1.activate (flags, 1, 0, max_prio) != 0) - { - ACE_ERROR ((LM_ERROR, - "(%t|%T) cannot activate worker thread.\n")); - } - - - worker1.wait (); - - ACE_DEBUG ((LM_DEBUG, - "(%t): wait for worker threads done in main thread\n")); - - if (do_shutdown) - { - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - sched_param.importance = 0; - sched_param.deadline = 0; - CORBA::Policy_var sched_param_policy = - scheduler->create_scheduling_parameter (sched_param); - CORBA::Policy_ptr implicit_sched_param = 0; - current->begin_scheduling_segment (0, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_DEBUG ((LM_DEBUG, "(%t): about to call server shutdown\n")); - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "after shutdown call in main thread\n")); - - - if (enable_dynamic_scheduling) - { - current->end_scheduling_segment (0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - - scheduler->shutdown (); - ACE_DEBUG ((LM_DEBUG, "scheduler shutdown done\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} - -// **************************************************************** - -Worker::Worker (CORBA::ORB_ptr orb, - Simple_Server_ptr server_ptr, - RTScheduling::Current_ptr current, - EDF_Scheduler* scheduler, - TimeBase::TimeT deadline, - long importance, - CORBA::Long server_load) - // int sleep_time) - : orb_ (CORBA::ORB::_duplicate (orb)), - server_ (Simple_Server::_duplicate (server_ptr)), - scheduler_current_ (RTScheduling::Current::_duplicate (current)), - scheduler_ (scheduler), - deadline_ (deadline), - importance_ (importance), - server_load_ (server_load) - // sleep_time_ (sleep_time) -{ -} - -int -Worker::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - const char * name = 0; - /* - ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to sleep for %d sec\n", sleep_time_)); - ACE_OS::sleep (sleep_time_); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):woke up from sleep for %d sec\n", sleep_time_)); - */ - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_ERROR((LM_ERROR, - ACE_TEXT ("getprio not supported\n") - )); - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n") - ACE_TEXT ("thr_getprio failed"))); - } - } - - ACE_DEBUG ((LM_DEBUG, "(%t|%T) worker activated with prio %d\n", prio)); - - if (enable_dynamic_scheduling) - { - EDF_Scheduling::SchedulingParameter sched_param; - CORBA::Policy_var sched_param_policy; - sched_param.importance = importance_; - sched_param.deadline = deadline_; - sched_param_policy = scheduler_->create_scheduling_parameter (sched_param); - CORBA::Policy_ptr implicit_sched_param = 0; - ACE_DEBUG ((LM_DEBUG, "(%t|%T):before begin_sched_segment\n")); - scheduler_current_->begin_scheduling_segment (name, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):after begin_sched_segment\n")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to make two way call\n")); - server_->test_method (server_load_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "(%t|%T):two way call done\n")); - - if (enable_dynamic_scheduling) - { - scheduler_current_->end_scheduling_segment (name); - ACE_CHECK_RETURN (-1); - } - - ACE_DEBUG ((LM_DEBUG, "client worker thread (%t) done\n")); - - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_server.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_server.cpp deleted file mode 100644 index 52967371edf..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/dt_twoway_server.cpp +++ /dev/null @@ -1,257 +0,0 @@ -//$Id$ - -#include "test_i.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" -#include "ace/High_Res_Timer.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "EDF_Scheduler.h" -#include "Task_Stats.h" - -ACE_RCSID(MT_Server, server, "server.cpp,v 1.3 2003/10/14 05:57:01 jwillemsen Exp") - -const char *ior_output_file = "test.ior"; - -int nthreads = 1; -int enable_dynamic_scheduling = 1; -const CORBA::Short max_importance = 100; -int enable_yield = 1; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:s"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 's': - enable_yield = 0; - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile>" - "-n (thread num)" - "-s (disable yield)" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -class Worker : public ACE_Task_Base -{ - // = TITLE - // Run a server thread - // - // = DESCRIPTION - // Use the ACE_Task_Base class to run server threads - // -public: - Worker (CORBA::ORB_ptr orb); - // ctor - - virtual int svc (void); - // The thread entry point. - -private: - CORBA::ORB_var orb_; - // The orb -}; - -Task_Stats task_stats; - -int -main (int argc, char *argv[]) -{ - EDF_Scheduler* scheduler = 0; - RTScheduling::Current_var current; - long flags; - int sched_policy = ACE_SCHED_RR; - int sched_scope = ACE_SCOPE_THREAD; - - if (sched_policy == ACE_SCHED_RR) - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_RR; - else - flags = THR_NEW_LWP | THR_BOUND | THR_JOINABLE | THR_SCHED_FIFO; - - task_stats.init (100000); - - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - return 1; - - if (enable_dynamic_scheduling) - { - CORBA::Object_ptr manager_obj = - orb->resolve_initial_references ("RTSchedulerManager" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - TAO_RTScheduler_Manager_var manager = - TAO_RTScheduler_Manager::_narrow (manager_obj - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type; - if (enable_yield) - { - disp_impl_type = Kokyu::DSRT_CV_BASED; - } - else - { - disp_impl_type = Kokyu::DSRT_OS_BASED; - } - - ACE_NEW_RETURN (scheduler, - EDF_Scheduler (orb.in (), - disp_impl_type, - sched_policy, - sched_scope), -1); - - manager->rtscheduler (scheduler); - - CORBA::Object_var object = - orb->resolve_initial_references ("RTScheduler_Current" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - current = - RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - Simple_Server_i server_impl (orb.in (), - current.in (), - task_stats, - enable_yield); - - Simple_Server_var server = - server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); - - // If the ior_output_file exists, output the ior to it - if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - Worker worker (orb.in ()); - if (worker.activate (flags, - nthreads, - 0, - ACE_Sched_Params::priority_max(sched_policy, - sched_scope)) != 0) - { - ACE_ERROR ((LM_ERROR, - "Cannot activate threads in RT class.", - "Trying to activate in non-RT class\n")); - - flags = THR_NEW_LWP | THR_JOINABLE | THR_BOUND; - if (worker.activate (flags, nthreads) != 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot activate server threads\n"), - 1); - } - } - - worker.wait (); - - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - - ACE_DEBUG ((LM_DEBUG, "shutting down scheduler\n")); - scheduler->shutdown (); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "Exiting main...\n")); - task_stats.dump_samples ("timeline.txt", - "Time\t\tGUID", - ACE_High_Res_Timer::global_scale_factor ()); - return 0; -} - -// **************************************************************** - -Worker::Worker (CORBA::ORB_ptr orb) - : orb_ (CORBA::ORB::_duplicate (orb)) -{ -} - -int -Worker::svc (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_Time_Value tv(120); - - ACE_TRY - { - this->orb_->run (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - ACE_DEBUG ((LM_DEBUG, "(%t|%T): Worker thread exiting...\n")); - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_client.xml b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_client.xml deleted file mode 100644 index 6cf9e4b3a3c..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_client.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE testconfig SYSTEM "ec_config.dtd"> -<testconfig> - <sink> - <type>0</type> - <period>1000</period> - <criticality value="VERY_LOW"/> - <importance value="VERY_LOW"/> - <num_entities>10</num_entities> - </sink> - <sink> - <type>1</type> - <period>3000</period> - <criticality value="VERY_HIGH" /> - <importance value="VERY_HIGH" /> - <num_entities>10</num_entities> - </sink> -</testconfig> diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.dtd b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.dtd deleted file mode 100644 index 31a4cdaf457..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.dtd +++ /dev/null @@ -1,11 +0,0 @@ - <!ELEMENT testconfig (test_config_t*) > - <!ELEMENT sink (type,period,criticality,importance,num_entities) > - <!ELEMENT source (type,period,criticality,importance,num_entities) > - <!ELEMENT type (#PCDATA) > -<!-- period is in milliseconds --> - <!ELEMENT period (#PCDATA) > - <!ELEMENT criticality EMPTY > - <!ELEMENT importance EMPTY > - <!ELEMENT num_entities (#PCDATA) > - <!ATTLIST criticality value (VERY_LOW|LOW|MEDIUM|HIGH|VERY_HIGH) #REQUIRED > - <!ATTLIST importance value (VERY_LOW|LOW|MEDIUM|HIGH|VERY_HIGH) #REQUIRED > diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.xml b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.xml deleted file mode 100644 index d5d6274062e..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_config.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE testconfig SYSTEM "ec_config.dtd"> -<testconfig> - <source> - <type>0</type> - <period>1000</period> - <criticality value="VERY_LOW" /> - <importance value="VERY_LOW" /> - <num_entities>10</num_entities> - </source> - <source> - <type>1</type> - <period>3000</period> - <criticality value="VERY_HIGH"/> - <importance value="VERY_HIGH"/> - <num_entities>10</num_entities> - </source> - - <sink> - <type>0</type> - <period>1000</period> - <criticality value="VERY_LOW"/> - <importance value="VERY_LOW"/> - <num_entities>10</num_entities> - </sink> - <sink> - <type>1</type> - <period>3000</period> - <criticality value="VERY_HIGH" /> - <importance value="VERY_HIGH" /> - <num_entities>10</num_entities> - </sink> -</testconfig> diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.cpp deleted file mode 100644 index b8934f4c91e..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.cpp +++ /dev/null @@ -1,202 +0,0 @@ -// $Id$ - -#include "Consumer.h" - -#include <sstream> //for ostringstream - -#include "ace/Thread.h" -#include "orbsvcs/Event_Utilities.h" //for ACE_Supplier/ConsumerQOS_Factory -#include "orbsvcs/RtecSchedulerC.h" - -ACE_RCSID(EC_Examples, Consumer, "$Id$") - -Consumer::Consumer (void) - : _consumer(this) - , _consumer_id(-1) -{ -} - -Consumer::~Consumer(void) -{ -} - -void -Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->connect_impl(false, - scheduler, - entry_prefix, - consumer_id, - event_type, - 0, //period; ignored - RtecScheduler::VERY_LOW_IMPORTANCE, //ignored - RtecScheduler::VERY_LOW_CRITICALITY, //ignored - ec - ACE_ENV_ARG_PARAMETER); -} - -void -Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->connect_impl(true, - scheduler, - entry_prefix, - consumer_id, - event_type, - period, - importance, - criticality, - ec - ACE_ENV_ARG_PARAMETER); -} - -void -Consumer::connect_impl (bool set_rtinfo, //true if should set RT_Info - RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->_consumer_id = consumer_id; - - //create consumer RT_Info - std::ostringstream cons_entry_pt; - cons_entry_pt << entry_prefix; //unique RT_Info entry point - ACE_DEBUG((LM_DEBUG,"Creating %s\n",cons_entry_pt.str().c_str())); - ACE_DEBUG((LM_DEBUG,"\timportance: %d\tcriticality: %d\n",importance,criticality)); - RtecScheduler::handle_t rt_info = scheduler->create (cons_entry_pt.str().c_str() - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - if (set_rtinfo) - { - //ignore period, since it will propagate from Supplier - RtecScheduler::Period_t p = 0;//period; - - ACE_Time_Value tv (0,0); - TimeBase::TimeT tmp; - ORBSVCS_Time::Time_Value_to_TimeT (tmp, tv); - scheduler->set (rt_info, - criticality, - tmp,tmp,tmp, - p, - importance, - tmp, - 0, - RtecScheduler::OPERATION - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - ACE_DEBUG((LM_DEBUG,"Set Consumer %d RT_Info\n",this->_consumer_id)); - ACE_DEBUG((LM_DEBUG,"\tcriticality: %d\n",criticality)); - ACE_DEBUG((LM_DEBUG,"\tTimes (worst,typical,cached): %d, %d, %d\n",tmp,tmp,tmp)); - ACE_DEBUG((LM_DEBUG,"\tperiod: %d\n",p)); - ACE_DEBUG((LM_DEBUG,"\timportance: %d\n",importance)); - ACE_DEBUG((LM_DEBUG,"\tquantum: %d\n",tmp)); - } else - { - ACE_DEBUG((LM_DEBUG,"NOT Set Consumer %d RT_Info\n",this->_consumer_id)); - } - - // Register as consumer of appropriate event type - ACE_ConsumerQOS_Factory consQoS; - consQoS.insert_type(event_type, - rt_info); - - RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_supplier_proxy = - consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventComm::PushConsumer_var consumerv = - this->_consumer._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_supplier_proxy->connect_push_consumer (consumerv.in (), - consQoS.get_ConsumerQOS () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_DEBUG((LM_DEBUG,"Consumer %d connected\n",this->_consumer_id)); - ACE_DEBUG((LM_DEBUG,"\tEvent type: %d\n",event_type)); -} - -void -Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - //disconnect consumer - - if (! CORBA::is_nil (this->_supplier_proxy.in())) - { - this->_supplier_proxy->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_supplier_proxy = RtecEventChannelAdmin::ProxyPushSupplier::_nil(); - - //Deactivate the servant - PortableServer::POA_var poa = - this->_consumer._default_POA(ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - PortableServer::ObjectId_var id = - poa->servant_to_id (&this->_consumer ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - poa->deactivate_object(id.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - ACE_DEBUG((LM_DEBUG,"Consumer %d disconnected\n",this->_consumer_id)); - } else - { - ACE_DEBUG((LM_DEBUG,"Cannot disconnect; Consumer %d not connected!\n",this->_consumer_id)); - } -} - -void -Consumer::push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - if (events.length () == 0) - { - ACE_DEBUG ((LM_DEBUG, - "Consumer (%P|%t) no events\n")); - return; - } - - int prio = -1; - ACE_hthread_t handle; - ACE_Thread::self(handle); - ACE_Thread::getprio(handle,prio); - //ACE_thread_t tid = ACE_Thread::self(); - ACE_DEBUG ((LM_DEBUG, "Consumer #%d @%d (%P|%t) we received event type %d\n", - this->_consumer_id,prio,events[0].header.type)); -} - -void -Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.h b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.h deleted file mode 100644 index 800bc309f3b..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_consumer.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = LIBRARY -// ORBSVCS Real-time Event Channel examples -// -// = FILENAME -// Consumer -// -// = AUTHOR -// Bryan A. Thrall (thrall@cse.wustl.edu) -// -// ============================================================================ - -#ifndef CONSUMER_H -#define CONSUMER_H - -#include "orbsvcs/RtecEventChannelAdminC.h" -#include "orbsvcs/RtecEventCommC.h" -#include "orbsvcs/RtecSchedulerC.h" -#include "orbsvcs/Channel_Clients_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class Consumer -{ - // = TITLE - // Simple consumer object - // - // = DESCRIPTION - // This class is a consumer of the events pushed by a TimeoutConsumer - // every timeout. - // - // It simply registers for the event type specified in its connect() - // function. - // -public: - Consumer (void); - // Default Constructor. - - virtual ~Consumer (void); - - void connect (RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - // This method connects the consumer to the EC without setting anything - // in the RT_Info (such as period, criticality, etc.). The consumer - // subscribes to events with the specified event_type. - - void connect (RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - // This method connects the consumer to the EC, setting RT_Info values - // for period, criticality, and importance. The consumer subscribes - // to events with the specified event_type. - - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - // Disconnect from the EC. - - // = The RtecEventComm::PushConsumer methods - - virtual void push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - // The skeleton methods. - -protected: - void connect_impl (bool set_rtinfo, //true if should set RT_Info - RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - int consumer_id, //unique identifier - long event_type, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - // This method implements the Consumer::connect() methods; if the first - // parameter is false, then the RT_Info values are ignored. Otherwise, - // they are set. - -private: - RtecEventChannelAdmin::ProxyPushSupplier_var _supplier_proxy; - // We talk to the EC (as a consumer) using this proxy. - - ACE_PushConsumer_Adapter<Consumer> _consumer; - // We connect to the EC as a consumer so we can receive the - // timeout events. - - int _consumer_id; -}; - -#endif /* CONSUMER_H */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_server.xml b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_server.xml deleted file mode 100644 index 8c10985f066..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_server.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE testconfig SYSTEM "ec_config.dtd"> -<testconfig> - <source> - <type>0</type> - <period>1000</period> - <criticality value="VERY_LOW" /> - <importance value="VERY_LOW" /> - <num_entities>10</num_entities> - </source> - <source> - <type>1</type> - <period>3000</period> - <criticality value="VERY_HIGH"/> - <importance value="VERY_HIGH"/> - <num_entities>10</num_entities> - </source> -</testconfig> diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.cpp deleted file mode 100644 index 006adaa3ae2..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.cpp +++ /dev/null @@ -1,193 +0,0 @@ -// $Id$ - -#include "Supplier.h" -#include "orbsvcs/Event_Utilities.h" //for ACE_Supplier/ConsumerQOS_Factory -#include "orbsvcs/Event_Service_Constants.h" - -ACE_RCSID(EC_Examples, Supplier, "$Id$") - -Supplier::Supplier (void) - : timeoutconsumer(this) - , _supplier(this) -{ -} - -Supplier::~Supplier() -{ -} - -void -Supplier::update(ACE_ENV_SINGLE_ARG_DECL) -{ - ACE_DEBUG((LM_DEBUG,"Supplier %d (%P|%t) received update\n",this->_supplier_id)); - - if (this->_num_sent < this->_to_send) - { - //send this->_events - this->_consumer_proxy->push(this->_events ACE_ENV_ARG_PARAMETER); - - ++this->_num_sent; - ACE_DEBUG((LM_DEBUG,"Sent events; %d sent\t%d total\n",this->_num_sent,this->_to_send)); - if (this->_num_sent >= this->_to_send) - { - //just finished; only want to do this once! - ACE_DEBUG((LM_DEBUG,"RELEASE read lock from Supplier %d\n", - this->_supplier_id)); - this->_done->release(); - this->_hold_mtx = 0; - } - } - else - { - //do nothing - } -} - -void -Supplier::connect (ACE_RW_Mutex* done, - RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventComm::EventSourceID supplier_id, - size_t to_send, - const RtecEventComm::EventSet& events, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) -{ - this->_supplier_id = supplier_id; - this->_to_send = to_send; - this->_num_sent = 0; - this->_hold_mtx = 0; - this->_done = done; - if (this->_done!= 0 && this->_num_sent<this->_to_send) - { - int ret = done->acquire_read(); - if (ret == -1) - { - ACE_DEBUG((LM_DEBUG,"ERROR: Could not acquire read lock for Supplier: %s\n", - ACE_OS::strerror(errno))); - } else - { - ACE_DEBUG((LM_DEBUG,"ACQUIRED read lock for Supplier %d\n",this->_supplier_id)); - this->_hold_mtx = 1; - } - } else - { - ACE_DEBUG((LM_DEBUG,"Already done; did not grab read lock for Supplier %d\n",this->_supplier_id)); - } - - this->_events.length(events.length()); - for (size_t i=0; i<events.length(); ++i) - { - this->_events[i] = events[i]; //copy event to local set - this->_events[i].header.source = this->_supplier_id; //make sure event source is this - } - - //create supplier RT_Info - std::ostringstream supp_entry_pt; - supp_entry_pt << entry_prefix << " Supplier " << this->_supplier_id; //unique RT_Info entry point - ACE_DEBUG((LM_DEBUG,"Creating %s\n",supp_entry_pt.str().c_str())); - ACE_DEBUG((LM_DEBUG,"\timportance: %d\tcriticality: %d\n",importance,criticality)); - RtecScheduler::handle_t rt_info = scheduler->create (supp_entry_pt.str().c_str() - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - ACE_Time_Value tv (0,0); - TimeBase::TimeT tmp; - ORBSVCS_Time::Time_Value_to_TimeT (tmp, tv); - scheduler->set (rt_info, - criticality, - tmp,tmp,tmp, - period, - importance, - tmp, - 0, - RtecScheduler::OPERATION - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // Register as supplier of events - ACE_SupplierQOS_Factory supplierQOS; - for (size_t i=0; i<events.length(); ++i) - { - //insert type for each event - supplierQOS.insert (this->_supplier_id, - events[i].header.type, - rt_info, - 1); - } - - RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_consumer_proxy = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - RtecEventComm::PushSupplier_var supplierv = - this->_supplier._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_consumer_proxy->connect_push_supplier (supplierv.in (), - supplierQOS.get_SupplierQOS () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_DEBUG((LM_DEBUG,"Supplier %d connected\n",this->_supplier_id)); - for (size_t i=0; i<events.length(); ++i) - { - ACE_DEBUG((LM_DEBUG,"\tEvent Type: %d\n",events[i].header.type)); - } - - //connect TimeoutConsumer for timeouts. - this->timeoutconsumer.connect(scheduler,supp_entry_pt.str().c_str(),period, - importance,criticality,ec ACE_ENV_ARG_PARAMETER); - - //Add Scheduler dependency between TimeoutConsumer and Supplier - scheduler->add_dependency (this->timeoutconsumer.get_RT_Info(), - rt_info, - 1, - RtecBase::TWO_WAY_CALL - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - -} - -void -Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL) -{ - if (! CORBA::is_nil (this->_consumer_proxy.in ())) - { - this->_consumer_proxy->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_consumer_proxy = - RtecEventChannelAdmin::ProxyPushConsumer::_nil (); - - // Deactivate the servant - PortableServer::POA_var poa = - this->_supplier._default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - PortableServer::ObjectId_var id = - poa->servant_to_id (&this->_supplier ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - this->timeoutconsumer.disconnect(ACE_ENV_SINGLE_ARG_PARAMETER); -} - -void -Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ -} - -// **************************************************************** - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.h b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.h deleted file mode 100644 index 3d31dce16d3..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_supplier.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ -// -// ============================================================================ -// -// = LIBRARY -// ORBSVCS Real-time Event Channel examples -// -// = FILENAME -// Supplier -// -// = AUTHOR -// Bryan Thrall (thrall@cse.wustl.edu) -// -// ============================================================================ - -#ifndef SUPPLIER_H -#define SUPPLIER_H - -#include "orbsvcs/RtecEventCommC.h" -#include "orbsvcs/RtecEventCommC.h" -#include "orbsvcs/RtecSchedulerC.h" -#include "orbsvcs/Channel_Clients_T.h" -#include "ace/RW_Mutex.h" -#include "TimeoutConsumer.h" -#include <sstream> //for ostringstream - - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class Supplier : Timeout_Observer -{ - // = TITLE - // Simple supplier object which responds to timeout events. - // - // = DESCRIPTION - // This class is an event supplier which responds to EC timeouts. - // For each timeout event it is notified of (via a TimeoutConsumer object), - // it pushes a specified EventSet into the EC. - // - // There are several ways to connect and disconnect this class, - // and it is up to the driver program to use the right one. - // -public: - Supplier (void); - // Default Constructor. - - virtual ~Supplier (void); - - virtual void update(ACE_ENV_SINGLE_ARG_DECL); - - void connect (ACE_RW_Mutex* done, - RtecScheduler::Scheduler_ptr scheduler, - const char *entry_prefix, - TimeBase::TimeT period, - RtecScheduler::Importance_t importance, - RtecScheduler::Criticality_t criticality, - RtecEventComm::EventSourceID supplier_id, - size_t to_send, - const RtecEventComm::EventSet& events, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); - // This method connects the supplier to the EC. - - void disconnect (ACE_ENV_SINGLE_ARG_DECL); - // Disconnect from the EC. - - // = The RtecEventComm::PushSupplier methods - - virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - // The skeleton methods. - -private: - size_t _to_send; //number of times to push on timeout - size_t _num_sent; //number of pushes so far - int _hold_mtx; //1 when hold _done mutex; 0 else - ACE_RW_Mutex* _done; //release read lock when _num_sent >= _to_send - - TimeoutConsumer timeoutconsumer; - - RtecEventComm::EventSourceID _supplier_id; - // We generate an id based on the name.... - - RtecEventChannelAdmin::ProxyPushConsumer_var _consumer_proxy; - // We talk to the EC (as a supplier) using this proxy. - - ACE_PushSupplier_Adapter<Supplier> _supplier; - // We connect to the EC as a supplier so we can push events - // every time we receive a timeout event. - - RtecEventComm::EventSet _events; - // set of events to push when a timeout event is received. -}; - -#endif /* SUPPLIER_H */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.cpp deleted file mode 100644 index 38856c00c9b..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// $Id$ - -#include <dsui_types.h> -#include "ace/Array.h" -#include "ace/Bound_Ptr.h" -#include "ace/Synch.h" -#include "ace/Get_Opt.h" -#include "ace/String_Base.h" -#include "ace/Dynamic_Service.h" -#include "orbsvcs/Event/EC_Kokyu_Factory.h" -#include "orbsvcs/Event/EC_Gateway_IIOP_Factory.h" -#include "ACEXML/parser/parser/Parser.h" -#include "ACEXML/common/InputSource.h" -#include "ACEXML/common/FileCharStream.h" -#include "ACEXML/common/DefaultHandler.h" - -#include "Config_Factory.h" -#include "Test_Handler.h" - -using namespace TestConfig; -using namespace ConfigFactory; - -struct Arguments -{ - ACE_CString filename_; -}; - -int parse_args (int argc, char *argv[],Arguments &args); - -int -main (int argc, char *argv[]) -{ - TAO_EC_Gateway_IIOP_Factory::init_svcs(); - Default_Config_Factory::init_svcs(); - - int retval = 0; - ds_control ctrl ("Test start","ec_test.dsui"); - - ACEXML_TRY_NEW_ENV - { - ACEXML_Parser parser; - Arguments args; - args.filename_.set(ACE_TEXT("ec_config.xml")); - - // parse args for config filename - if (parse_args(argc,argv,args) == -1) - { - return 1; - } - - ACEXML_FileCharStream *fcs = new ACEXML_FileCharStream(); - if ((retval = fcs->open(args.filename_.c_str())) != 0) { - ACE_DEBUG ((LM_DEBUG, "Could not open file %s\n",args.filename_.c_str())); - return retval; - } - - ACEXML_InputSource is (fcs); //takes responsibility of fcs - - Test_Handler handler (args.filename_.c_str()); - ACEXML_DefaultHandler dflt; - - parser.setContentHandler (&handler); - parser.setDTDHandler (&dflt); - parser.setErrorHandler (&handler); - parser.setEntityResolver (&dflt); - - parser.parse(&is); - ACEXML_TRY_CHECK; - - if ((retval = fcs->close()) != 0) { - ACE_DEBUG ((LM_DEBUG, "Could not close file %s\n",args.filename_.c_str())); - return retval; - } - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Finished parsing\n"))); - - // configure according to parsed XML - - //get Config_Factory service - Config_Factory *fact( - ACE_Dynamic_Service<Config_Factory>::instance ("Config_Factory")); - - if (fact == 0) - { - ACE_NEW_RETURN (fact, - Default_Config_Factory,-1); - } - - Test_Config *backend = fact->create_testconfig(); - if (0 == backend) { - ACE_DEBUG((LM_DEBUG, "Error: could not create back end!\n")); - return 1; - } - - TCFG_SET_WPTR cfg_ptr(handler.get_configs()); - - int retval = 0; - if ((retval = backend->configure(cfg_ptr)) != 0) { - ACE_DEBUG((LM_DEBUG, "Error configuring back end! (%d)\n",retval)); - return retval; - } - - if ((retval = backend->run()) != 0) { - ACE_DEBUG((LM_DEBUG, "Error running back end! (%d)\n",retval)); - return retval; - } - - fact->destroy_testconfig(backend); - fact->fini(); - - } - ACEXML_CATCH (ACEXML_SAXException, ex) - { - ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Exception occurred: %s. Exiting...\n"), - ex.message())); - return 1; - } - ACEXML_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Finished successfully\n"))); - - return retval; -} - -int parse_args (int argc, char *argv[], Arguments &args) -{ - ACE_Get_Opt get_opts (argc, argv, "f:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'f': - args.filename_.set(get_opts.opt_arg()); - ACE_DEBUG((LM_DEBUG,ACE_TEXT("Filename argument: %s\n"),args.filename_.c_str())); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "[-f <filename>] " - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.dsui b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.dsui deleted file mode 100644 index e69de29bb2d..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.dsui +++ /dev/null diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.mpc b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.mpc deleted file mode 100644 index 4b361e601ec..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/ec_test.mpc +++ /dev/null @@ -1,13 +0,0 @@ -project(ectest_app): orbsvcsexe, rtevent, rtsched, rtschedevent, kokyu, acexml { - exename = ectest - after += test_driver_lib - libs += wrappers Test_Driver - includes += $(TAO_ROOT)/orbsvcs/examples/RtEC/test_driver - - Source_Files { - ec_test.cpp - } - - IDL_Files { - } -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/edf_example.mpc b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/edf_example.mpc deleted file mode 100644 index 37d4286e5c3..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/edf_example.mpc +++ /dev/null @@ -1,33 +0,0 @@ -project(prio_server): kokyu_dsrt_scheduler_server { - exename = prio_server - Source_Files { - test_i.cpp - dt_prio_server.cpp - } -} - -project(twoway_server): kokyu_dsrt_scheduler_server { - exename = twoway_server - Source_Files { - test_i.cpp - dt_twoway_server.cpp - } -} - -project(prio_client): orbsvcsexe, kokyu_dsrt_scheduler_client { - exename = prio_client - libs += TAO_Svc_Utils - Source_Files { - testC.cpp - dt_prio_client.cpp - } -} -project(twoway_client): orbsvcsexe, kokyu_dsrt_scheduler_client { - exename = twoway_client - libs += TAO_Svc_Utils - Source_Files { - testC.cpp - dt_twoway_client.cpp - } -} - diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/svc.conf b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/svc.conf deleted file mode 100644 index ae8708fded9..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/svc.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECdispatching kokyu -ECscheduling kokyu -ECfiltering kokyu -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECsupplierfiltering per-supplier -ECObserver basic" -static Config_Factory "-ECConfig edf" -static EC_Gateway_IIOP_Factory "-ECGIIOPConsumerECControl reactive -ECGIIOPUseConsumerProxyMap 0"
\ No newline at end of file diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test.idl b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test.idl deleted file mode 100644 index 8e4147982b9..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test.idl +++ /dev/null @@ -1,8 +0,0 @@ -//$Id$ - -interface Simple_Server -{ - long test_method (in long x); - - void shutdown (); -}; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1.idl b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1.idl deleted file mode 100644 index a2da26ab405..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1.idl +++ /dev/null @@ -1,8 +0,0 @@ -//$Id$ - -interface Simple_Server1 -{ - oneway void test_method (in long x, in long y); - - void shutdown (); -}; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.cpp deleted file mode 100644 index 6b9bd1add1f..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.cpp +++ /dev/null @@ -1,159 +0,0 @@ -//$Id$ - -#include "test1_i.h" -#include "ace/High_Res_Timer.h" -#include "ace/Task.h" -#include "ace/ACE.h" -#include "tao/debug.h" -#include "orbsvcs/orbsvcs/Time_Utilities.h" -#include "EDF_Scheduler.h" -#include "Task_Stats.h" - -#include "dt_oneway_config.h" -#include "dt_oneway_dsui_families.h" -#include <dsui.h> - -#if !defined(__ACE_INLINE__) -#include "test1_i.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(MT_Server, test1_i, "test1_i.cpp,v 1.2 2003/10/08 13:26:32 venkita Exp") - -int Deadline_missed = 0; - -void -Simple_Server1_i::test_method (CORBA::Long exec_duration, CORBA::Long deadline ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - - - - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - int guid; - - ACE_OS:: - memcpy (&guid, - this->current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (), - sizeof (this->current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->length ())); - - DSUI_EVENT_LOG (TEST_ONE_FAM, START_SERVICE, guid, 0, NULL); - - ACE_High_Res_Timer timer; - ACE_Time_Value elapsed_time; - - ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n")); - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_DEBUG((LM_DEBUG, - ACE_TEXT ("getprio not supported on this platform\n") - )); - return; - } - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("getprio failed")) - ); - } - - ACE_DEBUG ((LM_DEBUG, - "Request in thread %t, prio = %d," - "exec duration = %u\n", prio, exec_duration)); - - static CORBA::ULong prime_number = 9619899; - - ACE_Time_Value compute_count_down_time (exec_duration, 0); - ACE_Countdown_Time compute_count_down (&compute_count_down_time); - - //Applicable only for CV based implementations - //yield every 1 sec - ACE_Time_Value yield_interval (0,100000); - - ACE_Time_Value yield_count_down_time (yield_interval); - ACE_Countdown_Time yield_count_down (&yield_count_down_time); - - timer.start (); - int j=0; - while (compute_count_down_time > ACE_Time_Value::zero) - { - ACE::is_prime (prime_number, - 2, - prime_number / 2); - - ++j; - -#ifdef KOKYU_DSRT_LOGGING -// if (j%1000 == 0) -// { -// ACE_DEBUG ((LM_DEBUG, -// "(%t|%T) loop # = %d, load = %usec\n", j, exec_duration)); -// } -#endif - if (j%1000 == 0) - { - ACE_Time_Value run_time = ACE_OS::gettimeofday (); - task_stats_.sample (ACE_UINT64 (run_time.msec ()), guid); - } - - compute_count_down.update (); - - if (enable_yield_) - { - yield_count_down.update (); - if (yield_count_down_time <= ACE_Time_Value::zero) - { - CORBA::Policy_var sched_param_policy = - CORBA::Policy::_duplicate (current_-> - scheduling_parameter(ACE_ENV_SINGLE_ARG_PARAMETER)); - - const char * name = 0; - - CORBA::Policy_var implicit_sched_param = sched_param_policy; - current_->update_scheduling_segment (name, - sched_param_policy.in (), - implicit_sched_param.in () - ACE_ENV_ARG_PARAMETER); - yield_count_down_time = yield_interval; - yield_count_down.start (); - } - } - } - - TimeBase::TimeT current; - ORBSVCS_Time::Time_Value_to_TimeT (current, ACE_OS::gettimeofday ()); - CORBA::Long temp = (long) current; - if(temp > deadline ) - Deadline_missed=Deadline_missed +1; - - timer.stop (); - timer.elapsed_time (elapsed_time); - - - ACE_DEBUG ((LM_DEBUG, - "Request processing in thread %t done, " - "prio = %d, load = %d, elapsed time = %umsec, deadline_missed = %d\n", - prio, exec_duration, elapsed_time.msec (),Deadline_missed )); -/*DTTIME: - recording the finishing time on the server side. please also record the deadline_missed variable. -*/ - char* format = "Deadline missed: %d"; - char* extra_info = (char*) ACE_Allocator::instance()->malloc (strlen(format) + sizeof (Deadline_missed) - 2); - if (extra_info != 0) { - ACE_OS::sprintf(extra_info, "Deadline missed: %d", Deadline_missed); - DSUI_EVENT_LOG (TEST_ONE_FAM, DEADLINE_MISSED, guid, strlen(extra_info), extra_info); - } - ACE_Allocator::instance()->free(extra_info); - DSUI_EVENT_LOG (TEST_ONE_FAM, STOP_SERVICE, guid,0,NULL); -} - -void -Simple_Server1_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_DEBUG ((LM_DEBUG, "shutdown request from client\n")); - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.h b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.h deleted file mode 100644 index d3b83c9b470..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.h +++ /dev/null @@ -1,58 +0,0 @@ -//$Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/MT_Server -// -// = FILENAME -// test1_i.h -// -// = AUTHOR -// Carlos O'Ryan -// -// ============================================================================ - -#ifndef TAO_MT_SERVER_TEST_I_H -#define TAO_MT_SERVER_TEST_I_H - -#include "test1S.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "Task_Stats.h" - -class Simple_Server1_i : public POA_Simple_Server1 -{ - // = TITLE - // Simpler Server implementation - // - // = DESCRIPTION - // Implements the Simple_Server1 interface in test1.idl - // -public: - Simple_Server1_i (CORBA::ORB_ptr orb, - RTScheduling::Current_ptr current, - Task_Stats&, - int); - // ctor - - // = The Simple_Server1 methods. - void test_method (CORBA::Long x, CORBA::Long y ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - CORBA::ORB_var orb_; - RTScheduling::Current_var current_; - Task_Stats& task_stats_; - int enable_yield_; - // The ORB -}; - - -#if defined(__ACE_INLINE__) -#include "test1_i.i" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_MT_SERVER_TEST_I_H */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.i b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.i deleted file mode 100644 index eadf635456d..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test1_i.i +++ /dev/null @@ -1,13 +0,0 @@ -//$Id$ - -ACE_INLINE -Simple_Server1_i::Simple_Server1_i (CORBA::ORB_ptr orb, - RTScheduling::Current_ptr current, - Task_Stats& task_stats, - int enable_yield) - : orb_ (CORBA::ORB::_duplicate (orb)), - current_ (RTScheduling::Current::_duplicate (current)), - task_stats_ (task_stats), - enable_yield_ (enable_yield) -{ -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.cpp deleted file mode 100644 index 1cbc77bac3c..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.cpp +++ /dev/null @@ -1,129 +0,0 @@ -//$Id$ - -#include "test_i.h" -#include "ace/High_Res_Timer.h" -#include "ace/Task.h" -#include "ace/ACE.h" -#include "tao/debug.h" - -#if !defined(__ACE_INLINE__) -#include "test_i.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(MT_Server, test_i, "test_i.cpp,v 1.2 2003/10/08 13:26:32 venkita Exp") - -CORBA::Long -Simple_Server_i::test_method (CORBA::Long exec_duration ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_hthread_t thr_handle; - ACE_Thread::self (thr_handle); - int prio; - int guid; - - ACE_OS:: - memcpy (&guid, - this->current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (), - sizeof (this->current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->length ())); - - ACE_High_Res_Timer timer; - ACE_Time_Value elapsed_time; - - ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n")); - - if (ACE_Thread::getprio (thr_handle, prio) == -1) - { - if (errno == ENOTSUP) - { - ACE_DEBUG((LM_DEBUG, - ACE_TEXT ("getprio not supported on this platform\n") - )); - return 0; - } - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("getprio failed")), - -1); - } - - ACE_DEBUG ((LM_DEBUG, - "Request in thread %t, prio = %d," - "exec duration = %u\n", prio, exec_duration)); - - static CORBA::ULong prime_number = 9619899; - - ACE_Time_Value compute_count_down_time (exec_duration, 0); - ACE_Countdown_Time compute_count_down (&compute_count_down_time); - - //Applicable only for CV based implementations - //yield every 1 sec - ACE_Time_Value yield_interval (1,0); - - ACE_Time_Value yield_count_down_time (yield_interval); - ACE_Countdown_Time yield_count_down (&yield_count_down_time); - - timer.start (); - int j=0; - while (compute_count_down_time > ACE_Time_Value::zero) - { - ACE::is_prime (prime_number, - 2, - prime_number / 2); - - ++j; - -#ifdef KOKYU_DSRT_LOGGING -// if (j%1000 == 0) -// { -// ACE_DEBUG ((LM_DEBUG, -// "(%t|%T) loop # = %d, load = %usec\n", j, exec_duration)); -// } -#endif - if (j%1000 == 0) - { - ACE_Time_Value run_time = ACE_OS::gettimeofday (); - task_stats_.sample (ACE_UINT64 (run_time.msec ()), guid); - } - - compute_count_down.update (); - - if (enable_yield_) - { - yield_count_down.update (); - if (yield_count_down_time <= ACE_Time_Value::zero) - { - CORBA::Policy_var sched_param_policy = - CORBA::Policy::_duplicate (current_-> - scheduling_parameter(ACE_ENV_SINGLE_ARG_PARAMETER)); - - const char * name = 0; - - CORBA::Policy_ptr implicit_sched_param = 0; - current_->update_scheduling_segment (name, - sched_param_policy.in (), - implicit_sched_param - ACE_ENV_ARG_PARAMETER); - yield_count_down_time = yield_interval; - yield_count_down.start (); - } - } - } - - timer.stop (); - timer.elapsed_time (elapsed_time); - - ACE_DEBUG ((LM_DEBUG, - "Request processing in thread %t done, " - "prio = %d, load = %d, elapsed time = %umsec\n", - prio, exec_duration, elapsed_time.msec () )); - - return exec_duration; -} - -void -Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_DEBUG ((LM_DEBUG, "shutdown request from client\n")); - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.h b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.h deleted file mode 100644 index b5272fe567a..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.h +++ /dev/null @@ -1,57 +0,0 @@ -//$Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/MT_Server -// -// = FILENAME -// test_i.h -// -// = AUTHOR -// Carlos O'Ryan -// -// ============================================================================ - -#ifndef TAO_MT_SERVER_TEST_I_H -#define TAO_MT_SERVER_TEST_I_H - -#include "testS.h" -#include "tao/RTScheduling/RTScheduler_Manager.h" -#include "Task_Stats.h" - -class Simple_Server_i : public POA_Simple_Server -{ - // = TITLE - // Simpler Server implementation - // - // = DESCRIPTION - // Implements the Simple_Server interface in test.idl - // -public: - Simple_Server_i (CORBA::ORB_ptr orb, - RTScheduling::Current_ptr current, - Task_Stats&, - int); - // ctor - - // = The Simple_Server methods. - CORBA::Long test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - CORBA::ORB_var orb_; - RTScheduling::Current_var current_; - Task_Stats& task_stats_; - int enable_yield_; - // The ORB -}; - -#if defined(__ACE_INLINE__) -#include "test_i.i" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_MT_SERVER_TEST_I_H */ diff --git a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.i b/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.i deleted file mode 100644 index a1fc295ff6d..00000000000 --- a/TAO/examples/Kokyu_dsrt_schedulers/edf_example/test_i.i +++ /dev/null @@ -1,13 +0,0 @@ -//$Id$ - -ACE_INLINE -Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb, - RTScheduling::Current_ptr current, - Task_Stats& task_stats, - int enable_yield) - : orb_ (CORBA::ORB::_duplicate (orb)), - current_ (RTScheduling::Current::_duplicate (current)), - task_stats_ (task_stats), - enable_yield_ (enable_yield) -{ -} |