diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-07-18 17:40:11 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-07-19 20:22:52 +0200 |
commit | f4881aee5d5c39fd405619b1846776b8f9c65c77 (patch) | |
tree | 50d47a5a244c6fdd7493d02e92ad7209b4642045 /erts/etc/common | |
parent | f7ad9cbed032a14a222f7709d4f63c839c780b7b (diff) | |
download | otp-f4881aee5d5c39fd405619b1846776b8f9c65c77.tar.gz otp-f4881aee5d5c39fd405619b1846776b8f9c65c77.tar.bz2 otp-f4881aee5d5c39fd405619b1846776b8f9c65c77.zip |
erts: Remove VxWorks from heart and etc files
Diffstat (limited to 'erts/etc/common')
-rw-r--r-- | erts/etc/common/Makefile.in | 97 | ||||
-rw-r--r-- | erts/etc/common/heart.c | 86 |
2 files changed, 6 insertions, 177 deletions
diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in index b10f5d9a87..0e128fda12 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in @@ -33,11 +33,7 @@ else ifeq ($(TYPE),purify) PURIFY = purify TYPEMARKER = -ifeq ($(findstring ose,$(TARGET)),ose) -TYPE_FLAGS = -g -XO -DPURIFY -else TYPE_FLAGS = -g -O2 -DPURIFY -endif else override TYPE=opt @@ -77,25 +73,15 @@ EMUDIR = $(ERL_TOP)/erts/emulator/beam EMUOSDIR = $(ERL_TOP)/erts/emulator/@ERLANG_OSTYPE@ SYSDIR = $(ERL_TOP)/erts/emulator/sys/@ERLANG_OSTYPE@ DRVDIR = $(ERL_TOP)/erts/emulator/drivers/@ERLANG_OSTYPE@ -VXETC = ../vxworks UXETC = ../unix OSEETC = ../ose WINETC = ../win32 -ifeq ($(findstring vxworks,$(TARGET)), vxworks) -ERLEXEC = erl.exec -else -ifeq ($(findstring ose,$(TARGET)), ose) -ERLEXEC = -TAR = @TAR@ -else ifeq ($(TARGET), win32) ERLEXEC = erlexec.dll else ERLEXEC = erlexec endif -endif -endif # On windows we always need reentrant libraries. ifeq ($(TARGET),win32) @@ -110,42 +96,6 @@ ERTS_LIB = $(ERL_TOP)/erts/lib_src/obj/$(TARGET)/$(TYPE)/MADE # Release directory specification # ---------------------------------------------------- -ifeq ($(findstring vxworks,$(TARGET)), vxworks) -INSTALL_EMBEDDED_PROGS = $(BINDIR)/erl_io $(BINDIR)/rdate $(BINDIR)/vxcall -INSTALL_EMBEDDED_DATA = $(BINDIR)/erl_script.sam $(VXETC)/resolv.conf -INSTALL_INCLUDES = $(VXETC)/reclaim.h -INSTALL_TOP = $(VXETC)/README.VxWorks -INSTALL_MISC = -INSTALL_SRC = heart.c $(VXETC)/heart_config.h $(VXETC)/heart_config.c \ - $(VXETC)/erl.exec.c $(VXETC)/rdate.c $(VXETC)/vxcall.c \ - $(VXETC)/erl_io.c -ERLEXECDIR = $(VXETC) -INSTALL_LIBS = $(OBJDIR)/reclaim.o -INSTALL_OBJS = $(OBJDIR)/heart.o -TEXTFILES = $(BINDIR)/erl_script.sam -ERLSRV_OBJECTS= -MC_OUTPUTS= -ENTRY_LDFLAGS= -ENTRY_OBJ= -INSTALL_PROGS = \ - $(INET_GETHOST) \ - $(BINDIR)/heart \ - $(BINDIR)/$(ERLEXEC) \ - $(INSTALL_EMBEDDED_PROGS) -else -ifeq ($(findstring ose,$(TARGET)), ose) -INSTALL_TOP = $(OSEETC)/README.OSE -INSTALL_ERL_OSE = monolith lm erl_utils drivers port_progs host -INSTALL_SRC = -INSTALL_LIBS = -INSTALL_OBJS = -INSTALL_INCLUDES = -INSTALL_PROGS = -ERLSRV_OBJECTS= -MC_OUTPUTS= -ENTRY_LDFLAGS= -ENTRY_OBJ= -else ifeq ($(TARGET),win32) CFLAGS += -I$(EMUOSDIR) -I$(WINETC) RC=rc.sh @@ -207,7 +157,7 @@ endif PORT_ENTRY_POINT=erl_port_entry ENTRY_LDFLAGS=-entry:$(PORT_ENTRY_POINT) -else +else # UNIX (!win32) ENTRY_LDFLAGS= ENTRY_OBJ= ERLSRV_OBJECTS= @@ -232,8 +182,6 @@ INSTALL_PROGS = \ $(BINDIR)/$(ERLEXEC) \ $(INSTALL_EMBEDDED_PROGS) endif -endif -endif .PHONY: etc etc: $(ENTRY_OBJ) $(INSTALL_PROGS) $(INSTALL_LIBS) $(TEXTFILES) $(INSTALL_TOP_BIN) @@ -396,24 +344,6 @@ endif # End of windows specific targets. #--------------------------------------------------------- -ifeq ($(findstring vxworks,$(TARGET)), vxworks) -$(BINDIR)/heart: $(OBJDIR)/heart.o $(OBJDIR)/heart_config.o - $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/heart.o $(OBJDIR)/heart_config.o - -$(OBJDIR)/heart_config.o: $(VXETC)/heart_config.c - $(CC) $(CFLAGS) -o $@ -c $(VXETC)/heart_config.c - -$(OBJDIR)/reclaim.o: $(VXETC)/reclaim.c - $(CC) $(CFLAGS) -o $@ -c $(VXETC)/reclaim.c - -$(OBJDIR)/heart.o: heart.c - $(CC) $(CFLAGS) -I$(VXETC) -o $@ -c heart.c - -$(BINDIR)/erl_script.sam: $(VXETC)/erl_script.sam.in ../../vsn.mk - sed -e 's;%VSN%;$(VSN);' \ - $(VXETC)/erl_script.sam.in > $(BINDIR)/erl_script.sam -else - $(BINDIR)/heart@EXEEXT@: $(OBJDIR)/heart.o $(ENTRY_OBJ) $(LD) $(LDFLAGS) $(ENTRY_LDFLAGS) -o $@ $(OBJDIR)/heart.o \ $(ENTRY_OBJ) $(WINDSOCK) @@ -421,31 +351,6 @@ $(BINDIR)/heart@EXEEXT@: $(OBJDIR)/heart.o $(ENTRY_OBJ) $(OBJDIR)/heart.o: heart.c $(RC_GENERATED) $(CC) $(CFLAGS) -o $@ -c heart.c -endif - - -# VxWorks specific executables and objects ... - -$(BINDIR)/erl_io: $(OBJDIR)/erl_io.o - $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/erl_io.o - -$(OBJDIR)/erl_io.o: $(VXETC)/erl_io.c - $(CC) $(CFLAGS) -o $@ -c $(VXETC)/erl_io.c - -$(BINDIR)/rdate: $(OBJDIR)/rdate.o - $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/rdate.o - -$(OBJDIR)/rdate.o: $(VXETC)/rdate.c - $(CC) $(CFLAGS) -o $@ -c $(VXETC)/rdate.c - -$(BINDIR)/vxcall: $(OBJDIR)/vxcall.o - $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/vxcall.o - -$(OBJDIR)/vxcall.o: $(VXETC)/vxcall.c - $(CC) $(CFLAGS) -o $@ -c $(VXETC)/vxcall.c - - - # # Objects & executables # diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index 755e308219..6ac77e4e63 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -66,8 +66,7 @@ * input and output file descriptors (0 and 1). These descriptors * (and the standard error descriptor 2) must NOT be closed * explicitely by this program at termination (in UNIX it is - * taken care of by the operating system itself; in VxWorks - * it is taken care of by the spawn driver part of the Emulator). + * taken care of by the operating system itself). * * END OF FILE * @@ -75,12 +74,6 @@ * that there is no process at the other end of the connection * having the connection open for writing (end-of-file). * - * HARDWARE WATCHDOG - * - * When used with VxWorks(with CPU40), the hardware - * watchdog is enabled, making sure that the system reboots - * even if the heart port program malfunctions or the system - * is completely overloaded. */ #ifdef HAVE_CONFIG_H @@ -93,9 +86,6 @@ #include <fcntl.h> #include <process.h> #endif -#ifdef VXWORKS -#include "sys.h" -#endif /* * Implement time correction using times() call even on Linuxes @@ -116,19 +106,7 @@ #include <time.h> #include <errno.h> -#ifdef VXWORKS -# include <vxWorks.h> -# include <ioLib.h> -# include <selectLib.h> -# include <netinet/in.h> -# include <rebootLib.h> -# include <sysLib.h> -# include <taskLib.h> -# include <wdLib.h> -# include <taskHookLib.h> -# include <selectLib.h> -#endif -#if !defined(__WIN32__) && !defined(VXWORKS) +#if !defined(__WIN32__) # include <sys/types.h> # include <netinet/in.h> # include <sys/time.h> @@ -550,8 +528,7 @@ kill_old_erlang(void){ CloseHandle(erlh); } } -#elif !defined(VXWORKS) -/* Unix eh? */ +#else static void kill_old_erlang(void){ pid_t pid; @@ -570,7 +547,7 @@ kill_old_erlang(void){ } } } -#endif /* Not on VxWorks */ +#endif #ifdef __WIN32__ void win_system(char *command) @@ -653,7 +630,7 @@ do_terminate(reason) case R_ERROR: case R_CLOSED: default: -#if defined(__WIN32__) /* Not VxWorks */ +#if defined(__WIN32__) { if(!cmd[0]) { char *command = get_env(HEART_COMMAND_ENV); @@ -1026,59 +1003,6 @@ time_t timestamp(time_t *res) return r; } -#elif defined(VXWORKS) - -static WDOG_ID watchdog_id; -static volatile unsigned elapsed; -static WIND_TCB *this_task; -/* A simple variable is enough to lock the time update, as the - watchdog is run at interrupt level and never preempted. */ -static volatile int lock_time; - -static void my_delete_hook(WIND_TCB *tcb) -{ - if (tcb == this_task) { - wdDelete(watchdog_id); - watchdog_id = NULL; - taskDeleteHookDelete((FUNCPTR) &my_delete_hook); - } -} - -static void my_wd_routine(int count) -{ - if (watchdog_id != NULL) { - ++count; - if (!lock_time) { - elapsed += count; - count = 0; - } - wdStart(watchdog_id, sysClkRateGet(), - (FUNCPTR) &my_wd_routine, count); - } -} - -void init_timestamp(void) -{ - lock_time = 0; - elapsed = 0; - watchdog_id = wdCreate(); - this_task = (WIND_TCB *) taskIdSelf(); - taskDeleteHookAdd((FUNCPTR) &my_delete_hook); - wdStart(watchdog_id, sysClkRateGet(), - (FUNCPTR) &my_wd_routine, 0); -} - -time_t timestamp(time_t *res) -{ - time_t r; - ++lock_time; - r = (time_t) elapsed; - --lock_time; - if (res != NULL) - *res = r; - return r; -} - #elif defined(HAVE_GETHRTIME) void init_timestamp(void) |