Commit f78f5a68 authored by Robert Sprowson's avatar Robert Sprowson

Fix failure to make large time jumps when delagating

NetTime intercepts OS_Word 15, but when calling RTC_Adjust was not disabling that interception, so the time got set twice, ending up back at a copy of the (incorrect) soft clock.

Version 0.43. Tagged as 'NetTime-0_43'
parent a979130c
/* (0.42)
/* (0.43)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.42
#define Module_MajorVersion_CMHG 0.43
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 24 Nov 2013
#define Module_Date_CMHG 28 Nov 2013
#define Module_MajorVersion "0.42"
#define Module_Version 42
#define Module_MajorVersion "0.43"
#define Module_Version 43
#define Module_MinorVersion ""
#define Module_Date "24 Nov 2013"
#define Module_Date "28 Nov 2013"
#define Module_ApplicationDate "24-Nov-13"
#define Module_ApplicationDate "28-Nov-13"
#define Module_ComponentName "NetTime"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/NetTime"
#define Module_FullVersion "0.42"
#define Module_HelpVersion "0.42 (24 Nov 2013)"
#define Module_LibraryVersionInfo "0:42"
#define Module_FullVersion "0.43"
#define Module_HelpVersion "0.43 (28 Nov 2013)"
#define Module_LibraryVersionInfo "0:43"
......@@ -26,9 +26,9 @@
#include "ntp.h"
static _kernel_oserror *err;
static int we_are_setting;
static int grabbed_event;
int we_are_setting;
void *privateword;
#ifdef STANDALONE
extern void *resource_files(void);
......@@ -204,7 +204,6 @@ _kernel_oserror *module_callhandler(_kernel_swi_regs *r, void *pw)
return NULL;
}
_kernel_oserror *module_set_time(const struct riscos_time *t)
{
_kernel_oserror *e;
......
......@@ -212,11 +212,13 @@ int rtcadjust_adjtime(int64_t offset, int P)
/* Submit the offset to the central adjustments bureau */
LastDelta = offset;
running = true;
we_are_setting = 1;
offset = offset >> 24;
_swix(RTC_Adjust, _INR(0,3),
(uint32_t)offset, (uint32_t)(offset >> 32),
P, RTCPriority_NetTime);
_swix(OS_ReadMonotonicTime, _OUT(0), &LastMonoTime);
we_are_setting = 0;
return -1;
}
......
......@@ -119,6 +119,7 @@ unsigned int get_hal_t0_count(uint32_t, void *);
*/
extern int sockno;
extern void *privateword;
extern int we_are_setting;
extern int synchronised;
extern struct in_addr last_server;
extern int last_protocol;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment