1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-31 12:12:45 +00:00
serenity/Libraries/LibC
Tom 5f51d85184 Kernel: Improve time keeping and dramatically reduce interrupt load
This implements a number of changes related to time:
* If a HPET is present, it is now used only as a system timer, unless
  the Local APIC timer is used (in which case the HPET timer will not
  trigger any interrupts at all).
* If a HPET is present, the current time can now be as accurate as the
  chip can be, independently from the system timer. We now query the
  HPET main counter for the current time in CPU #0's system timer
  interrupt, and use that as a base line. If a high precision time is
  queried, that base line is used in combination with quering the HPET
  timer directly, which should give a much more accurate time stamp at
  the expense of more overhead. For faster time stamps, the more coarse
  value based on the last interrupt will be returned. This also means
  that any missed interrupts should not cause the time to drift.
* The default system interrupt rate is reduced to about 250 per second.
* Fix calculation of Thread CPU usage by using the amount of ticks they
  used rather than the number of times a context switch happened.
* Implement CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE and use it
  for most cases where precise timestamps are not needed.
2020-12-21 18:26:12 +01:00
..
arpa LibC: Fix a warning when building LibC with -O2 2020-10-20 18:10:22 +02:00
bits LibC: Add POSIX1 minimum limits to limits.h 2020-11-10 14:39:38 +01:00
net Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
netinet LibC: Add some missing netinet macros required by OpenSSH 2020-09-27 01:02:11 +02:00
sys LibC: Make it possible to use ASSERTs without initializing stdio 2020-12-14 23:05:53 +01:00
alloca.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
assert.cpp LibC: Make it possible to use ASSERTs without initializing stdio 2020-12-14 23:05:53 +01:00
assert.h Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
byteswap.h Meta: Add missing copyright headers 2020-04-06 11:09:01 +02:00
CMakeLists.txt LibC: Also build a static version of libc 2020-12-14 23:05:53 +01:00
crt0.cpp LibC: Avoid ninja-imports of system functions 2020-08-12 20:40:59 +02:00
crt0_shared.cpp Loader: Stabilize loader & Use shared libraries everywhere :^) 2020-12-14 23:05:53 +01:00
crti.S Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
crtn.S Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
ctype.cpp LibC: Remove an unneeded string.h include in ctype.h/cpp 2020-09-27 21:15:25 +02:00
ctype.h LibC: Remove an unneeded string.h include in ctype.h/cpp 2020-09-27 21:15:25 +02:00
cxxabi.cpp LibC: Move C++ABI functions to cxxabi.cpp, typecheck cxa_atexit 2020-08-12 20:40:59 +02:00
dirent.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
dirent.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
dlfcn.cpp Loader: Add dynamic loader program 2020-12-14 23:05:53 +01:00
dlfcn.h Loader: Add dynamic loader program 2020-12-14 23:05:53 +01:00
endian.h LibC: Fix big endian definitions 2020-02-19 16:08:28 +01:00
errno.h LibC: Add NO_TLS preprocessor flag 2020-12-14 23:05:53 +01:00
errno_numbers.h Kernel+LibC: Don't allow a directory to become a subdirectory of itself 2020-11-01 19:21:19 +01:00
fcntl.cpp LibC: Missing varargs cleanup in fcntl 2020-08-17 09:17:57 +02:00
fcntl.h Kernel+LibC: Switch isatty() to use a fcntl() 2020-05-20 08:31:31 +02:00
fd_set.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
float.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
getopt.cpp LibC: Don't include things required for getopt_long in unistd.h 2020-09-06 21:36:36 +02:00
getopt.h LibC: Include cdefs.h in getopt.h 2020-09-27 01:02:11 +02:00
grp.cpp LibC: Use AK::String-backed buffers instead of static buffers 2020-08-30 17:35:27 +02:00
grp.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
iconv.h Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
inttypes.h LibC: Add SCNu64 and SCNd64 macros for stress-g port 2020-12-21 00:19:45 +01:00
ioctl.cpp LibC: Missing varargs cleanup in ioctl 2020-08-17 09:17:57 +02:00
libcinit.cpp LibC: Add NO_TLS preprocessor flag 2020-12-14 23:05:53 +01:00
libgen.cpp Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
libgen.h Meta: Claim copyright for files created by me 2020-01-24 15:15:16 +01:00
limits.h LibC: Add POSIX1 minimum limits to limits.h 2020-11-10 14:39:38 +01:00
locale.cpp LibC: Use dbgln() in setlocale() 2020-10-30 17:03:28 +01:00
locale.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
malloc.cpp LibC: Notify UE at the start of free() instead of at the end 2020-11-16 15:11:02 +01:00
mallocdefs.h LibC: Move some of malloc's data structures into mallocdefs.h 2020-11-14 22:51:49 +01:00
memory.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
mman.cpp Kernel: Support TLS allocation from userspace 2020-12-14 23:05:53 +01:00
mman.h Kernel: Support TLS allocation from userspace 2020-12-14 23:05:53 +01:00
mntent.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
mntent.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
netdb.cpp Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
netdb.h LibC: getprotoent() family of functions 2020-04-18 10:11:55 +02:00
paths.h LibC: Add paths.h with some default mail directory for now 2020-09-27 01:02:11 +02:00
poll.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
poll.h Kernel: Move block condition evaluation out of the Scheduler 2020-11-30 13:17:02 +01:00
pwd.cpp LibC: Use AK::String-backed buffers instead of static buffers 2020-08-30 17:35:27 +02:00
pwd.h LibC: Implement putpwent() 2020-02-02 10:58:45 +01:00
qsort.cpp LibC: Remove unused data member in the qsort() implementation 2020-08-24 18:22:09 +02:00
regex.h LibJS: Hook up Regex<ECMA262> to RegExpObject and implement `test()' 2020-11-27 21:32:41 +01:00
scanf.cpp LibC: Add FIXME for vsscanf 2020-09-27 01:02:11 +02:00
sched.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
sched.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
serenity.cpp Kernel+LibC: Use uintptr_t as the main type in the syscall interface 2020-10-12 19:53:25 +02:00
serenity.h Kernel+LibC: Use uintptr_t as the main type in the syscall interface 2020-10-12 19:53:25 +02:00
setjmp.h Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
setjmp.S Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
signal.cpp Userland+LibC: Add "kill -l" to show all known signal names/numbers 2020-10-29 23:32:18 +01:00
signal.h Userland+LibC: Add "kill -l" to show all known signal names/numbers 2020-10-29 23:32:18 +01:00
signal_numbers.h Kernel+LibC+UE: Introduce SIGINFO (generated with ^T) 2020-09-09 21:10:23 +02:00
spawn.cpp Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
spawn.h Add manpages for posix_spawn 2020-07-06 10:01:14 +02:00
stat.cpp LibC: Move stat(), lstat() and fstat() to <sys/stat.h> 2020-08-11 20:29:14 +02:00
stdarg.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
stdbool.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
stddef.h Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
stdint.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
stdio.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
stdio.h AK: Make the return type of dbgputstr consistent. 2020-10-04 19:18:32 +02:00
stdlib.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
stdlib.h Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
string.cpp LibC: strtok_r() should not go past the last token 2020-11-14 11:24:42 +01:00
string.h LibC: Don't advertise wrong functions 2020-09-12 13:46:15 +02:00
strings.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
strings.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
syslog.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
syslog.h Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
termcap.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
termcap.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
termios.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
termios.h LibC: Implement cf{g,s}et{i,o}speed 2020-07-04 10:49:36 +02:00
time.cpp Kernel+LibC: Add adjtime(2) 2020-11-10 19:03:08 +01:00
time.h Kernel: Improve time keeping and dramatically reduce interrupt load 2020-12-21 18:26:12 +01:00
times.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
ulimit.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
ulimit.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
unistd.cpp Kernel: Improve time keeping and dramatically reduce interrupt load 2020-12-21 18:26:12 +01:00
unistd.h Kernel: Implement _SC_OPEN_MAX 2020-09-27 01:02:11 +02:00
utime.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
utime.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
utmp.h LibC: Add missing utmp backwards compatibility hacks and user/dead process macros 2020-09-27 01:02:11 +02:00
utsname.cpp Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
wchar.cpp Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
wchar.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00