Commit graph

11 commits

Author SHA1 Message Date
Tom b0773a8ea6 AK: Add Atomic.h
Use gcc built-in atomics
2019-10-12 19:30:59 +02:00
Andreas Kling c59fdcc021 Kernel: Move Lock code out-of-line.
It's so big and chunky anyway, it's silly to expand it everywhere.
This makes it a lot easier to read function disassembly dumps.
2019-07-29 11:19:04 +02:00
Andreas Kling 27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Andreas Kling 736092a087 Kernel: Move i386.{cpp,h} => Arch/i386/CPU.{cpp,h}
There's a ton of work that would need to be done before we could spin up on
another architecture, but let's at least try to separate things out a bit.
2019-06-07 20:02:01 +02:00
Robin Burchell 0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling 2f4e7edee5 Kernel: Simplify dump_backtrace() API for clients.
It makes no sense that clients had to worry about whether or not KSyms
were loaded.
2019-05-16 13:41:16 +02:00
Andreas Kling 8c3ad802d8 Kernel: Have Lock dump backtrace on lock-while-interrupts-disabled error. 2019-05-14 11:50:15 +02:00
Andreas Kling 6bb0dbe8bf Kernel: Lock::unlock_if_locked() should never donate to holder.
Since we're not interested in taking the lock if it's already held,
there's no need to donate the remainder of our time slice to the holder.
2019-04-17 12:37:44 +02:00
Andreas Kling d5a9f4596b Kernel: Add a blunt big process lock.
We can't have multiple threads in the same process running in the kernel
at the same time, so let's have a per-process lock that threads have to
acquire on syscall entry/exit (and yield while blocked.)
2019-04-01 20:04:29 +02:00
Andreas Kling 60d25f0f4a Kernel: Introduce threads, and refactor everything in support of it.
The scheduler now operates on threads, rather than on processes.
Each process has a main thread, and can have any number of additional
threads. The process exits when the main thread exits.

This patch doesn't actually spawn any additional threads, it merely
does all the plumbing needed to make it possible. :^)
2019-03-23 22:03:17 +01:00
Andreas Kling 313ee8dd19 Move Lock from AK to Kernel, since it only works inside the kernel. 2019-03-16 13:18:22 +01:00
Renamed from AK/Lock.h (Browse further)