-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
y2038: Support for Y2038 safe time on 32 bit systems
The time_t type is now Y2038 safe, which means that it is aliased to __time64_t when __USE_TIME_BITS64 is defined or __time_t otherwise. On the contrary the __time_t for 32 bit systems is only 32 bit, so for Y2038 safe system it must be 64 bit (as is time_t) This patch introduces the Y2038 specific code to make clock_settime/ __clock_settime64 Y2038 safe on 32 bit systems. This goal is achieved by using aliasing to clock_settime names when __USE_TIME_BITS64 is defined. As a result user programs call 64 bit versions of functions (i.e. __clock_settime64 instead of __clock_settime), which must have been globally visible for this purpose - for non Y2038 safe code those are hidden in glibc. Additionally this patch also converts following syscalls to be Y2038: - difftime - mktime - timegm - ctime_r - ctime - gmtime_r - gmtime - clock_gettime64 - clock_settime64 - clock_getres64 - utimensat - futimens - clock_nanosleep_time64 - ppoll64 - timer_gettime - timer_settime - difftime - timerfd_gettime - timerfd_settime - sched_rr_get_interval - timespec_get - settimeofday - gettimeofday - setitimer - getitimer - getrusage - wait4_time64 - utimes - utime - mq_timedsend - mq_timedreceive - futimes - lutimes - futimesat - semtimedop -> credits: Adhemerval Zanella - pselect -> credits: Adhemerval Zanella - recvmmsg -> credits: Adhemerval Zanella - nanosleep -> credits: Adhemerval Zanella - select -> credits: Adhemerval Zanella - sigtimedwait -> credits: Adhemerval Zanella - clock_adjtime64 - adjtime - adjtimex - ntp_gettime - ntp_gettimex - ntp_adjtime - just alias to ___adjtimex64 function - *stat* conversion (WIP) - Adhemerval Zanella - https://patchwork.ozlabs.org/project/glibc/list/?series=191904 - nptl (uses futex_time64): - pthread_timedjoin_np - pthread_clockjoin_np - pthread_cond_clockwait - pthread_cond_timedwait - sem_clockwait - sem_timedwait - pthread_rwlock_clockrdlock - pthread_rwlock_clockwrlock - pthread_rwlock_timedrdlock - pthread_rwlock_timedwrlock TO DO: - aio_suspend ()
- Loading branch information
Lukasz Majewski
committed
Oct 7, 2020
1 parent
9783c41
commit 7321535
Showing
36 changed files
with
762 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ libc { | |
} | ||
GLIBC_PRIVATE { | ||
__getrlimit; | ||
__getrusage64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,7 @@ libc { | |
} | ||
GLIBC_2.21 { | ||
} | ||
GLIBC_PRIVATE { | ||
__sigtimedwait64; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.