[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CLOK cookie and Tgettimeofday()
1. For no one protested I think the CLOK cookie should be added to the
`official' list of cookies.
cookie 'CLOK': describe kernel time, if it doesn't exist a value of 0L
is assumed!
description of it's value:
&xff000000 bitfield
&x00ffffff offset from UTC in seconds (+/- 12h)
(if & 0x00800000 it is a negative value!)
bitfield:
00000011
00000000 kernel time is LMT including DST (needs TZ variable)
00000001 kernel time is LMT without DST (TZ variable recom.)
00000010 kernel time is UTC (TZ variable recom.)
00110000
00010000 kernel supports Tgettimeofday() call
00110000 Tgettimeofday() call returns valid tzp structure
00001100 reserved for real time resulotion in tv_usec
00000000 5ms
CLOCK_IS_UTC (2L<<24) kernel time is UTC time
CLOCK_IS_LMT (1L<<24) kernel time is LocalMeanTime
OS_HAS_TgetTOD (16L<<24) kernel supports Tgettimeofday() call
TgetTOD_HAS_TZP (32L<<24) only valid if OS_HAS_TgetTOD
----
2. About Tgettimeofday() etc:
If the defined opcodes are still unused please reserve them for the named
functions, and add the lines to mintbind.h.
If not please tell me some opcodes I can use for these functions -- in a
reasonable time.
#define Tgettimeofday(tvp, tzp) \
trap_1_wll(0x155, (long)(tvp), (long)(tzp))
#define Tsettimeofday(tvp, tzp) \
trap_1_wll(0x156, (long)(tvp), (long)(tzp))
#define Tadjtime(delta, olddelta) \
trap_1_wll(0x157, (long)(delta), (long)(olddelta))
retrun values: 0 success or both pointers are NULL, ERROR,
EINVFN, EACCDN (settime, adjtime & not root), ERANGE
jerry
jerry@merlin.abacus.de jerry@zedat.fu-berlin.de