Problem with _TOD_Set
Chris Johns
cjohns at cybertec.com.au
Fri Sep 20 00:10:11 UTC 2002
rtems wrote:
>
> Before the patch we are unable to obtain a NTP synchronization between
> different CPUs on Ethernet network better then 1 Sec
>
This is what was happening with the TOD set code.
>
> After the patch we are capable to obtain synchronization in term of 1
> tick system CPU clock between CPUs.
>
> Can anyone confirm the problem or is there an error in our analysis?
>
I can confirm the problem and a patch has been in CVS since the
7-Aug-2002. The patch in CVS is (sorry about being pasted):
===================================================================
RCS file: /usr1/CVS/rtems/cpukit/score/src/coretodset.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -c -r1.2 -r1.3
*** rtems/cpukit/score/src/coretodset.c 1999/11/17 17:50:39 1.2
--- rtems/cpukit/score/src/coretodset.c 2002/08/07 15:03:52 1.3
***************
*** 9,15 ****
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
! * $Id: coretodset.c,v 1.2 1999/11/17 17:50:39 joel Exp $
*/
#include <rtems/system.h>
--- 9,15 ----
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
! * $Id: coretodset.c,v 1.3 2002/08/07 15:03:52 joel Exp $
*/
#include <rtems/system.h>
***************
*** 50,57 ****
seconds_since_epoch - _TOD_Seconds_since_epoch );
ticks_until_next_second = _TOD_Ticks_per_second;
! if ( ticks_until_next_second > _TOD_Current.ticks )
! ticks_until_next_second -= _TOD_Current.ticks;
_TOD_Current = *the_tod;
_TOD_Seconds_since_epoch = seconds_since_epoch;
--- 50,57 ----
seconds_since_epoch - _TOD_Seconds_since_epoch );
ticks_until_next_second = _TOD_Ticks_per_second;
! if ( ticks_until_next_second > the_tod->ticks )
! ticks_until_next_second -= the_tod->ticks;
_TOD_Current = *the_tod;
_TOD_Seconds_since_epoch = seconds_since_epoch;
--
Chris Johns, cjohns at cybertec.com.au
More information about the users
mailing list