Commit Graph

19 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen cbf0c1dc97 Fix endian swapping classes reading volatile values twice. 2023-01-09 23:44:40 +01:00
Jonas 'Sortie' Termansen 611dc22e73 Standardize header include guards.
This change makes all the standard library and kernel headers use header
guards with a consistent scheme within the reserved namespace to avoid
conflicts with non-standard-library-implementation code.
2022-07-09 20:51:13 +02:00
Jonas 'Sortie' Termansen 5e7605fad2 Implement threading primitives that truly sleep.
The idle thread is now actually run when the system is idle because it
truly goes idle. The idle thread is made power efficient by using the hlt
instruction rather than a busy loop.

The new futex(2) system call is used to implement fast user-space mutexes,
condition variables, and semaphores. The same backend and design is used as
kutexes for truly sleeping kernel mutexes and condition variables.

The new exit_thread(2) flag EXIT_THREAD_FUTEX_WAKE wakes a futex.

Sleeping on clocks in the kernel now uses timers for true sleep.

The interrupt worker thread now truly sleeps when idle.

Kernel threads are now named.

This is a compatible ABI change.
2021-06-23 22:10:47 +02:00
Jonas 'Sortie' Termansen 07e6c69097 Fix empty struct thread_rwlockattr_t. 2017-08-20 12:44:33 +02:00
Jonas 'Sortie' Termansen 2b72262b4f Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.

All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.

All imported code from other projects is compatible with this license.

All GPL licensed code from other projects had previously been removed.

Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-05 22:21:50 +01:00
Jonas 'Sortie' Termansen 8e988c1bf1 Convert libpthread to C and merge into libc. 2016-03-03 23:02:23 +01:00
Jonas 'Sortie' Termansen a79aeed0c1 Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
Jonas 'Sortie' Termansen b8c91e36f4 Remove FLOAT_WORD_ORDER. 2015-08-22 01:29:37 +02:00
Jonas 'Sortie' Termansen bb84370c34 Add type limits and print/scan specifiers to <sys/types.h>. 2014-11-26 23:34:14 +01:00
Jonas 'Sortie' Termansen 512c9d3f08 Improve wchar declarations in <wchar.h>, <wctype.h> and <stdint.h>. 2014-03-01 14:37:41 +01:00
Jonas 'Sortie' Termansen 30a95dfa1e Split parts of <features.h> into <sys/cdefs.h>. 2013-12-17 14:30:44 +01:00
Jonas 'Sortie' Termansen ad1c6e0ed7 Remove <sys/__/types.h> inclusion from <features.h>. 2013-12-17 14:30:42 +01:00
Jonas 'Sortie' Termansen 36bb159941 Add big and small endian data types to <endian.h>. 2013-12-17 14:30:35 +01:00
Jonas 'Sortie' Termansen 931c0d1bc5 Add inttypes.h format and scan macros. 2013-12-17 14:30:32 +01:00
Jonas 'Sortie' Termansen 17f51aca20 Add <__/limits.h> stub. 2013-12-17 14:30:30 +01:00
Jonas 'Sortie' Termansen fc8d64013d Refactor datatype declarations. 2013-12-17 14:30:28 +01:00
Jonas 'Sortie' Termansen 6e22ee877d Provide __/wordsize.h. 2013-12-17 14:30:27 +01:00
Jonas 'Sortie' Termansen e70887cf3d Add endian.h. 2013-12-17 14:30:27 +01:00
Jonas 'Sortie' Termansen bb1c80f68e Add byteswap.h. 2013-12-17 14:30:27 +01:00