Commit Graph

16 Commits

Author SHA1 Message Date
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 b767063c9a Fix deadlock when resizing display when a graphical process is running. 2018-08-08 23:46:19 +02:00
Jonas 'Sortie' Termansen 5be7b52422 Fix LFBTextBuffer GetChar starting worker thread when paused. 2018-08-06 23:59:35 +02:00
Jonas 'Sortie' Termansen 0bb608b09e Support 8-bit/24-bit color and more escape codes in the graphical console.
The console has gained these escape codes:
 - Set color to any of 256 entries in the palette.
 - Set color to any 24-bit RGB value.
 - Inverse mode.
 - Bold mode.
 - Underline mode.
 - Move cursor to line N.
 - \a is now ignored.

The effectively unused ATTR_CHAR has been removed. Parsing of escape codes
has been improved. The graphical palette has been changed to the tango
colors, which makes Sortix look a bit differently. Some user-space programs
have been changed to use different colors that look better under the new
palette.

Remove const from methods that weren't really const and remove mutable
keyword workaround.
2016-11-27 11:19:03 +01:00
Jonas 'Sortie' Termansen e7c5d032d1 Refactor graphical resolution changes. 2016-11-27 11:18:48 +01:00
Jonas 'Sortie' Termansen 91a6ee7919 Add 24-bit graphics support to kernel. 2016-09-28 20:29:18 +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 8f233b4a10 Add console backspace bold and underline support.
Combine textbuffer char and attr concepts while here.
2016-01-23 01:02:50 +01:00
Jonas 'Sortie' Termansen af9cc8ed05 Schedule full console redraw after user-space framebuffer write. 2016-01-08 19:56:11 +01:00
Jonas 'Sortie' Termansen dad5c57f33 Allow bootloader bitmap framebuffer modesetting. 2016-01-08 19:56:11 +01:00
Jonas 'Sortie' Termansen 3501b1e701 Fix console margin not having color of nearest neighbour. 2015-09-25 15:01:19 +02:00
Jonas 'Sortie' Termansen 6813a26196 Fix box drawing character ninth column rendering. 2015-09-25 14:59:04 +02:00
Jonas 'Sortie' Termansen 20b8a3c639 Add support for \e[9xm and \e[10xm escape sequences. 2014-11-25 17:19:32 +01:00
Jonas 'Sortie' Termansen dc11b9f837 Add unicode support to kernel terminal and console. 2014-11-24 17:41:26 +01:00
Jonas 'Sortie' Termansen 81ad72ae89 Fix renegade graphical console rendering thread.
The console rendering thread doesn't get shut down as the lfbtextbuffer did
not think it had a rendering thread. This causes corruptions to occur when a
subsequent resolution change destroys the lfbtextbuffer class instance, but
the thread continues to use the class. Lots of undefined behavior occurs as
the memory gets reallocated for other purposes.
2014-11-20 17:04:45 +01:00
Jonas 'Sortie' Termansen 98a87fa1e5 Rename Sortix kernel directory to kernel. 2014-03-01 14:37:39 +01:00
Renamed from sortix/lfbtextbuffer.cpp (Browse further)