Commit Graph

14 Commits

Author SHA1 Message Date
Lenny Maiorani
765936ebae
Everywhere: Switch from (void) to [[maybe_unused]] (#4473)
Problem:
- `(void)` simply casts the expression to void. This is understood to
  indicate that it is ignored, but this is really a compiler trick to
  get the compiler to not generate a warning.

Solution:
- Use the `[[maybe_unused]]` attribute to indicate the value is unused.

Note:
- Functions taking a `(void)` argument list have also been changed to
  `()` because this is not needed and shows up in the same grep
  command.
2020-12-21 00:09:48 +01:00
Tom
d98edb3171 Kernel: List all CPUs in /proc/cpuinfo 2020-07-01 12:07:01 +02:00
Tom
fb41d89384 Kernel: Implement software context switching and Processor structure
Moving certain globals into a new Processor structure for
each CPU allows us to eventually run an instance of the
scheduler on each CPU.
2020-07-01 12:07:01 +02:00
Andreas Kling
1ef5d609d9 AK+LibC: Add TODO() as an alternative to ASSERT_NOT_REACHED()
I've been using this in the new HTML parser and it makes it much easier
to understand the state of unfinished code branches.

TODO() is for places where it's okay to end up but we need to implement
something there.

ASSERT_NOT_REACHED() is for places where it's not okay to end up, and
something has gone wrong.
2020-05-30 11:31:49 +02:00
Andreas Kling
ccfee3e573 Kernel: Remove more <LibBareMetal/Output/kstdio.h> includes 2020-02-10 12:07:48 +01:00
Liav A
e559af2008 Kernel: Apply changes to use LibBareMetal definitions 2020-02-09 19:38:17 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01: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
0c898e3c2c Put assertions behind a DEBUG flag to make it easy to build without them. 2019-04-23 21:52:02 +02:00
Andreas Kling
0bc72551f4 Kernel: Remove two unneeded headers. 2019-04-10 22:49:11 +02:00
Andreas Kling
ac46e45f6e Kernel: Remove unneeded kassert.h. 2019-04-03 12:51:10 +02:00
Andreas Kling
12e515735b Add a simple IDEDiskDevice class that implements DiskDevice from VFS. 2018-10-16 14:17:43 +02:00
Andreas Kling
9396108034 Import the "gerbert" kernel I worked on earlier this year.
It's a lot crappier than I remembered it. It's gonna need a lot of work.
2018-10-16 11:02:00 +02:00