EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Redundancy Patches
From: Andrew Johnson <[email protected]>
To: EPICS core-talk <[email protected]>
Date: Thu, 15 Nov 2007 17:36:35 -0600
I am about to send out a series of patches (against R3.14.9) that DESY have asked to be integrated into Base which are required to be able to create redundant IOCs. The redundancy subsystem itself is a separate module which redundant IOC applications must link to; these patches only provide hooks into Base at appropriate locations.

We do not have to accept these changes as given, but I think it's accepted that we want to make it possible for redundant IOCs to be created without having to patch Base itself, so we'll have to suggest some alternative technique to anything that we don't like.

I would appreciate comments and discussion from other developers on the facilities being added and the proposed implementation. I am attaching Gongfa Liu's description of the changes to this email, and I will send out the changes in subsequent emails, grouped by subsystem. I will also be commenting on the changes myself, in a separate message (probably tomorrow).

Both Gongfa Liu and Bernd Schoeneburg who are responsible for this code are subscribed to core-talk, thus they will see and can respond to all comments sent here.

- Andrew
--
When a distinguished but elderly scientist states that something is
possible, he is almost certainly right.  When he states that something
is impossible, he is very probably wrong.  -- Arthur C. Clarke
**************
Modified 
**************

# configuration 
(1) for Linux, modify the related file in base/configure/os 
    OSITHREAD_USE_DEFAULT_STACK = YES

    OP_SYS_CFLAGS += -rdynamic
    OP_SYS_LDFLAGS += -export-dynamic
    OP_SYS_LDLIBS += -ldl

(2) for darwin, modify the related file in base/configure/os 
    OSITHREAD_USE_DEFAULT_STACK = YES

(3) for solaris, modify the related file in base/configure/os 
    OP_SYS_LDLIBS += -ldl

# source files 
(1) base-3.14.9/src/db/dbAccess.c
    dbPutSpecial() is added for CCE. This function is just a pipe to
    call the static function putSpecial(). dbPutSpecial() is written
    by John L. Dalesio and Bernd Schoeneburg originally.

(2) base-3.14.9/src/db/dbScan.c
    Register periodic scan tasks at RMT. When the IOC is SLAVE, these
    tasks are changed to be inactive.

(3) base-3.14.9/src/dbStatic/dbBase.h 
    enum type "redUp" and the element of struct dbFldDes "red_update"
    are added for CCE. They are added by Bernd Schoeneburg originally.

(4) base-3.14.9/src/dbStatic/dbLexRoutines.c
    Deal with pdbFldDes->red_update for CCE, by Bernd Schoeneburg
    originally.

(5) base-3.14.9/src/iocsh/iocsh.cpp 
    Change the definition of varArgs[2] in function
    iocshRegisterVariable because there is compiling error with
    tornado 2.2.1.This solution is from TRIUMF.

(6) base-3.14.9/src/libCom/osi/epicsMutex.cpp
    The function epicsMutexLockWithTimeout() is added.

(7) base-3.14.9/src/libCom/osi/epicsMutex.h
    The constant LOG_LAST_OWNER is defined. The function
    epicsMutexLockWithTimeout and epicsMutexOsdLockWithTimeout are
    declared.

(8) base-3.14.9/src/libCom/osi/epicsThread.h
    The function epicsThreadDelete is declared.

(9) base-3.14.9/src/libCom/osi/epicsTime.h
    The function epicsTimeGetTicks is declared.

(10) base-3.14.9/src/libCom/osi/os/posix/osdMutex.c
    The structure epicsMutexOSD is extended and the function
    epicsMutexOsdLockWithTimeout is implemented.

(11) base-3.14.9/src/libCom/osi/os/posix/osdThread.c
    The function epicsThreadDelete is implemented.

(12) base-3.14.9/src/libCom/osi/os/posix/osdTime.cpp
    The function epicsTimeGetTicks is implemented.

(13) base-3.14.9/src/libCom/osi/os/vxWorks/iocClock.c
    The function epicsTimeGetTicks is implemented.

(14) base-3.14.9/src/libCom/osi/os/vxWorks/osdMutex.c
    The function epicsMutexOsdLockWithTimeout is implemented.

(15) base-3.14.9/src/libCom/osi/os/vxWorks/osdThread.c
     The function epicsThreadDelete is implemented.

(16) base-3.14.9/src/makeBaseApp/top/configure/RELEASE
    The following lines are added for supporting iocRedundancy package:
        #If using iocRedundacy package, point REDUNDANCY at its top directory:
        #REDUNDANCY=$(EPICS_BASE)/../modules/soft/iocRedundancy

(17) base-3.14.9/src/makeBaseApp/top/exampleApp/src/Makefile
    The following lines are added for building redundant IOC application:
        # NOTE: To build redundant IOC application, REDUNDANCY must be defined
        # in the <top>/configure/RELEASE file

        ifneq ($(REDUNDANCY),)
           _APPNAME__DBD += rmt.dbd
           _APPNAME__DBD += cce.dbd
           _APPNAME__DBD += snlexec.dbd
           _APPNAME__LIBS += rmt
           _APPNAME__LIBS += cce
           _APPNAME__LIBS += snlexec
        endif

(18) base-3.14.9/src/rsrv/camsgtask.c
    Destroy client connenctions when the IOC is SLAVE.

(19) base-3.14.9/src/rsrv/caservertask.c
    Register CAS-TCP task at RMT. Stop responding the client connection
    request when the IOC is SLAVE.

(20) base-3.14.9/src/rsrv/cast_server.c
    Inactivate CAS-UDP task when the IOC is SLAVE.

(21) base-3.14.9/src/rsrv/online_notify.c
    Inactivate CAS-beacon task when the IOC is SLAVE.

**************
Added
**************
(1) base-3.14.9/src/db/rmtDrvIf.h
(2) base-3.14.9/src/rsrv/rmtDrvIf.h
    The head file for RMT driver interface.

(3) base-3.14.9/src/libCom/osi/os/Linux/osdFindSymbol.c
    Implement the function epicsFindSymbol for Linux.

(4) base-3.14.9/src/libCom/osi/os/posix/osdFindSymbol.c
    Implement the function epicsFindSymbol for posix.


Replies:
Re: Redundancy Patches Eric Norum

Navigate by Date:
Prev: Build rules for x86_64 hosts Denison, PN (Peter)
Next: Redundancy Patch: configure Andrew Johnson
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Build rules for x86_64 hosts Denison, PN (Peter)
Next: Re: Redundancy Patches Eric Norum
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·