Commit Graph

1821 Commits

Author SHA1 Message Date
Bananymous d4903caafa Kernel: Combine consecutive mouse move and scroll events
This makes mouse work much smoother when running without kvm.
2024-06-11 00:07:31 +03:00
Bananymous caa0111c79 BAN: Implement back() for CircularQueue 2024-06-11 00:05:11 +03:00
Bananymous ffacff67cf LibFont: Move PSF code to separate file 2024-06-10 16:10:05 +03:00
Bananymous f43a7fdfb4 Ports/doom: Doom now runs inside a window 2024-06-10 16:10:05 +03:00
Bananymous 7bb1a3906d BuildSystem: Run kvm-ok to determine kvm access 2024-06-10 16:10:05 +03:00
Bananymous 530c259e71 Kernel: Close unix domain socket when it gets destoyed
Inode closing is something that needs a complete rework. Currently all
sockets are closed when close() is called, which leads to connection
closing if you fork()/exec() with socket being marked as CLOEXEC.

Inodes should probably only be closed once they are not referenced
anywhere.
2024-06-03 18:06:01 +03:00
Bananymous 843a6851c4 Userspace: Start work on a terminal emulator
Terminal is still missing some ANSI codes, cursor and pseudo terminal
support.

Shell's builtin start-gui now launches a Terminal instead of test
windows.
2024-06-03 18:04:33 +03:00
Bananymous 234051d6bc Shell: Optimize drawing characters at the end of a command 2024-06-03 18:03:19 +03:00
Bananymous 981c0eb8bc Shell: Only set terminal properties if STDIN is a TTY 2024-06-03 18:02:49 +03:00
Bananymous 1066855532 LibGUI: Mark Window's server fd as CLOEXEC and expose it through API 2024-06-03 18:01:34 +03:00
Bananymous f2d6518311 LibGUI: Add new drawing APIs to LibGUI::Window 2024-06-03 18:00:50 +03:00
Bananymous 765ccfa18c Kernel: Deliver SIGCHLD on process exit and ignore it properly 2024-06-03 17:58:24 +03:00
Bananymous 201aee3119 LibInput: Implement key_to_utf8_ansi
This function outputs utf8 encoding of a key event or ansi code for
everything it is applicable (arrows, ctrl+..., ...)
2024-06-03 17:52:43 +03:00
Bananymous 65f299038d BAN: Implement traits {true,false}_type with integral_constant 2024-06-03 17:51:44 +03:00
Bananymous bd1290706a Kernel: Implement SharedMemoryObject cloning 2024-06-03 03:41:00 +03:00
Bananymous 939cbf46e4 BAN: Implement BAN::UTF8::to_codepoint() for single byte types 2024-06-03 03:39:57 +03:00
Bananymous aec5a09caf Kernel/LibC: Implement SYS_ISATTY and isatty() 2024-06-03 03:36:25 +03:00
Bananymous 6346d1b6c7 Shell: Add builtin command for starting window server and test windows 2024-06-02 17:27:40 +03:00
Bananymous 05ee242b80 WindowServer: Add window title to title bar and send close events 2024-06-02 17:27:09 +03:00
Bananymous 64be3f05a3 LibGUI: Add 10 second timeout for connecting to WindowServer 2024-06-02 17:25:17 +03:00
Bananymous cfdce9be61 BAN: Mark RefPtr and WeakPtr helper destructors virtual
Also fix a bug in WeakPtr::lock() which would assert false if the
underlying weak link was not initialized
2024-06-02 16:50:26 +03:00
Bananymous 446220494e Kernel: Unix domain sockets close can now be detected
When a unix domain socket is closed and it has a connection to another
socket, it will make the other socket readable and recv will return 0.

This allows detection of socket closing
2024-06-02 16:48:55 +03:00
Bananymous f12ffa92a0 LibFont: Font::get_glyph() now returns nullptr if glyph does not exist
This allows getting glyphs with a single hash lookup
2024-05-31 13:05:07 +03:00
Bananymous b2a4797d16 BAN: Fix dwarnln and derrorln stop color 2024-05-31 13:04:36 +03:00
Bananymous 8bfacb0091 Kernel: Implement deletion of SMO objects 2024-05-31 13:04:23 +03:00
Bananymous 0501f3bd99 Kernel: Move font code to its own library LibFont 2024-05-31 10:47:05 +03:00
Bananymous ae3ae6fd0e WindowServer: Fix partial invalidation over cursor 2024-05-31 03:20:21 +03:00
Bananymous 011a5f57e1 WindowServer: Add title bars and clean up code 2024-05-31 03:02:58 +03:00
Bananymous 84b3289a2a Kernel: Move Scheduler::yield() lock check after interrupts disabled
I have no idea why this solves a bug where current processor has
scheduler lock at the beginning of yield.
2024-05-31 02:56:39 +03:00
Bananymous b760892de2 Kernel: Make pselect use nanosecods instead of milliseconds 2024-05-31 02:56:17 +03:00
Bananymous 6840a8983c Kernel: Make sure MSB is not set on SMO keys 2024-05-29 20:01:12 +03:00
Bananymous a1b3490764 Kernel: Improve random number generation for unsigned types 2024-05-29 20:00:47 +03:00
Bananymous 076f1efecb Kernel: Fix 32 bit fast page locking
I forgot to change this when changing the lock type. 32 bit boots again
fine :D
2024-05-29 19:44:39 +03:00
Bananymous b23511edb1 LibC: Don't use BAN inside pwd.cpp
This made pwd.cpp require libstdc++ which meant that getlogin() also
needed libstdc++. This made build process of libstdc++ require itself
which is of course not possible.
2024-05-29 19:12:15 +03:00
Bananymous 53e572f072 Kernel: Fix s_fast_page_lock type on 32 bit target 2024-05-29 18:04:23 +03:00
Bananymous c2b6ba0d5a Userspace: Start work on GUI and WindowServer
Current implementation can create custom windows and each window has
its own framebuffer. When window wants to write its framebuffer to the
screen it will send a message to the WindowServer using unix sockets.
2024-05-29 16:00:54 +03:00
Bananymous d4d530e6c8 Kernel: Implement basic shared memory objects
These can allocate memory that can be shared between processes using
a global key. There is currenly no safety checks meaning anyone can
map any shared memory object just by trying to map every possible key.
2024-05-29 15:58:46 +03:00
Bananymous 99270e96a9 Kernel: Lock debug lock while printing fault details
This allows multiprocessor to dump clean output on concurrent faults
2024-05-29 15:49:24 +03:00
Bananymous 4bf7a08c80 Kernel: Allow SYS_PSELECT to work with timeout of zero 2024-05-29 15:32:18 +03:00
Bananymous 3823de6552 Kernel: Add templated get function for Random 2024-05-29 15:32:00 +03:00
Bananymous 30592b27ce BAN: Add comparison operators for RefPtr 2024-05-29 13:50:03 +03:00
Bananymous 8bc6c2eb20 Kernel: Move KeyEvent/MouseEvent from kernel to LibInput 2024-05-28 23:30:08 +03:00
Bananymous 87d52e5ebe Kernel: Fix timer early wake message
When printing early return message, current time was read twice. This
could lead to early return check failing, but when printing and reading
the time again subtraction overflow would happen.
2024-05-28 16:04:18 +03:00
Bananymous 598a09c13d Kernel: Allow select to work on any type of inode 2024-05-28 16:03:54 +03:00
Bananymous 54db4ab215 BAN: Increase BAN::Function storage size to 8 pointers 2024-05-28 16:01:41 +03:00
Bananymous 5b5ccba247 LibC: Define PATH_MAX in limits.h 2024-05-28 01:08:25 +03:00
Bananymous 18e2559b1e Kernel/LibC: Add SYS_TRUNCATE 2024-05-28 01:08:04 +03:00
Bananymous f5987b68ff BAN: Mark some class methods as constexpr 2024-05-28 01:07:29 +03:00
Bananymous a1ab44d39f Kernel: Optimize disk reads to read multiple sectors at once
Old StorageDevice::read_sectors() read each sector separately if the
underlying disk had a disk cache. This patch allows multiple sectors to
be read even if the disk cache exists and contains some of the sectors.

Only sectors that could not be found from the disk cache are actually
read from the disk. This optimization is not done for writing, which
still will write each sector separately, if disk cache has no memory to
store new sectors. It would feel kind of unnecessary optimization as you
have greater problems if disk cache cannot allocate a single page.
2024-05-27 15:52:34 +03:00
Bananymous 8b1514e575 Kernel: Make all storage devices readable and writable
I only had a {read,write}_impl defined for ATABaseDevice. This patch
moves that implmentation to general storage device.
2024-05-27 13:41:55 +03:00