Skip to content

Commit

Permalink
Update documentation for 64-bit transition
Browse files Browse the repository at this point in the history
  • Loading branch information
deadwood committed May 4, 2022
1 parent 0298348 commit c061262
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions rom/timer/64bit
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,40 @@ General rules:
1) If time is relative / fits into 32 bit, leave for compatibility
(-> ie_TimeStamp)
2) If time is absolute, add new functions
3) "struct timeval" is 64-bit so that it can be union between AROS-style and
POSIX-style
3) "struct timeval" has both fields 64 bit wide so that it can be union between
AROS-style and POSIX-style

Outcome:
AROS API:

1) Functions/Tags taking "struct timeval" directly (ie. GetSysTime):
a) 32 bit function gets renamed keeping LVO (-> GetSysTime32)
b) 32 bit function gets changed to accept "struct timeval32"
c) 64 bit function gets a new LVO, old name (-> GetSysTime) and accept
"struct timeval"
c) 64 bit function gets a new LVO and accepts "struct timeval"
d) 64 bit function naming (alternatives to be decided):
i) 64 bit function gets old name (-> GetSysTime)
This approach allows existing code to compile, but 64 bit values
might be used in places where 32 bit values are expected leading to
problems
OR
ii) 64 bit function ges new name (-> GetSysTime64) and old name is gone
This approach means that existing code will stop compiling and developer
will have to take action to review code and migrate it either to 64 bit
by using 64 bit functions or to 32 bit by replacing "struct timeval" with
"struct timeval32"
2) Functions/Tags not taking "struct timeval" directly (ie. Amiga2Date)
a) 32 bit function does not get renamed
b) 64 bit function gets a new name (-> Amiga2Date64) and a new LVO
3) timer.device commands
a) 32 bit commands are unchanged and accept "struct timerequest"
b) 64 bit commands are added (-> TR_GETSYSTIME64) using
"struct timerequest64"

C library API

1) time_t becomes 64 bit wide
2) "struct timeval" and "struct timespec" have both fields 64 bit wide
3) Function taking impacted structures/types:
a) 32 bit function gets renamed (-> xxx_time32) keeping LVO and 32-bit input
structures
b) 64 bit function gets a new name (-> xxx_time64) and a new LVO
c) defines are introduced to direct original name to 64 bit name

0 comments on commit c061262

Please sign in to comment.