Commit graph

5 commits

Author SHA1 Message Date
Andreas Kling
77cf607cda Kernel+LibC: Publish a "kernel info page" and use it for gettimeofday()
This patch adds a single "kernel info page" that is mappable read-only
by any process and contains the current time of day.

This is then used to implement a version of gettimeofday() that doesn't
have to make a syscall.

To protect against race condition issues, the info page also has a
serial number which is incremented whenever the kernel updates the
contents of the page. Make sure to verify that the serial number is the
same before and after reading the information you want from the page.
2019-12-15 21:29:26 +01:00
Emanuel Sprung
e7affa24dc LibC, LibM: Add functions needed to compile python3 2019-11-11 22:04:16 +01:00
Paweł Cholewa
c2a8c4cedd LibC: Minor changes to make nasm work
* Added some missing macros to headers
 * Stubbed strftime() time function to not assert
 * Added "rt" mode to fopen(), working just like "r" or "rb"
2019-11-09 20:52:34 +01:00
Andreas Kling
cc68654a44 Kernel+LibC: Implement clock_gettime() and clock_nanosleep()
Only the CLOCK_MONOTONIC clock is supported at the moment, and it only
has millisecond precision. :^)
2019-11-02 19:34:06 +01:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Renamed from LibC/time.cpp (Browse further)