EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: NTP issues with rtems 4.9 and EPICS R3.14.10
From: Till Straumann <[email protected]>
To: Eric Norum <[email protected]>
Cc: "Ernest L. Williams Jr." <[email protected]>, EPICS Techtalk <[email protected]>
Date: Mon, 09 Feb 2009 13:51:36 -0800
Vanilla 3.14.10 still doesn't initialize the time-related
variables correctly when run-time loading an EPICS application.

The attached patch below should fix this.

HTH
-- Till

Index: src/libCom/osi/os/RTEMS/osdTime.cpp
===================================================================
RCS file: /afs/slac/g/lcls/cvs/epics/base/3.14.10/src/libCom/osi/os/RTEMS/osdTime.cpp,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 osdTime.cpp
*** src/libCom/osi/os/RTEMS/osdTime.cpp	11 Jan 2009 02:33:42 -0000	1.1.1.1
--- src/libCom/osi/os/RTEMS/osdTime.cpp	6 Feb 2009 23:35:37 -0000
***************
*** 27,32 ****
--- 27,33 ----
  
  extern rtems_interval rtemsTicksPerSecond;
  int rtems_bsdnet_get_ntp(int, int(*)(), struct timespec *);
+ extern int rtems_bsdnet_ticks_per_second;
  static int ntpSocket = -1;
  
  void osdTimeRegister(void)
***************
*** 116,132 ****
   * explicitly calls osdTimeRegister() at the appropriate time.
   * However if we are loaded dynamically we *do* register our
   * standard time providers at static constructor time; in this
!  * case the tick rate will have been set already.
   */
  static int staticTimeRegister(void)
  {
-     if (rtemsTicksPerSecond != 0)
-         osdTimeRegister();
- 
      rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
      rtemsTicksPerSecond_double = rtemsTicksPerSecond;
      rtemsTicksPerTwoSeconds_double = rtemsTicksPerSecond_double * 2.0;
  
      return 1;
  }
  static int done = staticTimeRegister();
--- 117,133 ----
   * explicitly calls osdTimeRegister() at the appropriate time.
   * However if we are loaded dynamically we *do* register our
   * standard time providers at static constructor time; in this
!  * case the bsdnet tick rate will have been set already.
   */
  static int staticTimeRegister(void)
  {
      rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &rtemsTicksPerSecond);
      rtemsTicksPerSecond_double = rtemsTicksPerSecond;
      rtemsTicksPerTwoSeconds_double = rtemsTicksPerSecond_double * 2.0;
  
+     if (rtems_bsdnet_ticks_per_second != 0)
+         osdTimeRegister();
+ 
      return 1;
  }
  static int done = staticTimeRegister();


Navigate by Date:
Prev: Re: Diamond Libera EPICS Driver Michael Abbott
Next: EDM 1-11-1zc problems Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: "Count Num or Channel" option in MEDM cartesian plot Noboru Yamamoto
Next: EDM 1-11-1zc problems Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·