Andreas Kling
75fabef57b
LibGUI: Add GVariant class and use it for table model data.
2019-02-28 16:20:29 +01:00
Andreas Kling
711e2b2651
AK: Accept any number of l's as printf format qualifiers.
...
This isn't entirely correct and will catch a bunch of things it's not
supposed to, but it works for now.
2019-02-27 08:39:19 +01:00
Andreas Kling
2fb3fa7f69
WindowServer: Add a simple CPU usage graph to the global menu bar.
...
This is pretty cute and helps me spot when something's chewing up CPU.
2019-02-26 02:17:25 +01:00
Andreas Kling
9624b54703
More moving towards using signed types.
...
I'm still feeling this out, but I am starting to like the general idea.
2019-02-25 22:06:55 +01:00
Andreas Kling
901b7d5d91
Fix a bunch of compiler warnings. Not all, but a lot.
2019-02-25 19:05:51 +01:00
Andreas Kling
15fb917f28
Convert more RetainPtr use to Retained.
2019-02-25 16:04:08 +01:00
Andreas Kling
2cfcbdc735
AK: Add Retained<T>, like RetainPtr, but never null.
...
Also use some Clang attribute wizardry to get a warning for use-after-move.
2019-02-25 12:43:52 +01:00
Andreas Kling
d7753c7c8d
Move over to building all of userspace with i686-pc-serenity-g++.
2019-02-22 14:45:14 +01:00
Andreas Kling
6788dcdb58
Start fixing things up to build with a proper cross-compiler.
2019-02-22 10:23:28 +01:00
Andreas Kling
3df4a902df
Ext2FS: Lock a lot. Go way overkill with locking for now.
2019-02-20 13:09:59 +01:00
Andreas Kling
809ffa56d7
Kernel: Reduce code duplication in exception handlers.
2019-02-20 12:28:41 +01:00
Andreas Kling
e74c833af3
AK: Fix broken instrumentation code for StringImpl.
2019-02-17 10:35:48 +01:00
Andreas Kling
022f7790db
Use modern C++ attributes instead of __attribute__ voodoo.
...
This is quite nice, although I wish [[gnu::always_inline]] implied inline.
Also "gnu::" is kind of a wart, but whatcha gonna do.
2019-02-15 12:30:48 +01:00
Andreas Kling
27df572381
AK: Fix bug in MMX memcpy() unaligned prologue handling.
2019-02-12 12:39:04 +01:00
Andreas Kling
fd5136a1ab
AK: Oops, the optimization in Vector::append(Vector&&) was broken.
...
It forgot to clear out the moved-from vector. It's easy to see where this bug
came from: I assumed m_impl was an OwnPtr. It would be comfy if move() on some
arbitrary T* would also null it out but alas that's not how things work.
2019-02-11 12:44:59 +01:00
Andreas Kling
7014daa235
Kernel: Add an LRU block cache.
...
This papers over some of the incredibly inefficient access patterns in the
Ext2FS implementation for a while longer. :^)
2019-02-10 20:07:14 +01:00
Andreas Kling
33d34d9b26
Kernel: Use a Lockable<bool> for sysctl booleans as well.
2019-02-08 16:18:24 +01:00
Andreas Kling
dabb3c902a
AK: Add a Lockable wrapping container.
2019-02-08 09:46:13 +01:00
Andreas Kling
5582a0a254
Kernel: When a lock is busy, donate remaining process ticks to lock holder.
...
Since we know who's holding the lock, and we're gonna have to yield anyway,
we can just ask the scheduler to donate any remaining ticks to that process.
2019-02-07 11:14:58 +01:00
Andreas Kling
44e1a45b2a
AK: Optimize Vector::append(Vector&&) for case where this->m_impl is null.
2019-02-07 09:09:30 +01:00
Andreas Kling
1f159eaab0
Add a fast memcpy() using MMX when we're moving >= 1KB.
...
This is a nice speedup for WindowServer. I'll eventually have to do this
with SSE but the kernel doesn't support SSE yet so this is it for now.
2019-02-07 08:46:52 +01:00
Andreas Kling
d0b2949b4d
AK: Lock should ASSERT_INTERRUPTS_ENABLED().
...
Trying to take a Lock while interrupts are disabled is always a bug.
2019-02-06 17:34:24 +01:00
Andreas Kling
a1b63bb6d4
Bootloader: Locate the kernel's data segment and clear it.
...
This was a constant source of stupid bugs and I kept postponing it because
I wasn't in the mood to write assembly code. Until now! :^)
2019-02-06 16:02:10 +01:00
Andreas Kling
781f216676
AK: Add a TemporaryChange helper class.
2019-02-06 16:01:59 +01:00
Andreas Kling
8cc6e304ca
Kernel: Clean up around Scheduler::yield() a bit.
...
Also add assertion in Lock that the scheduler isn't currently active.
I've been seeing occasional fuckups that I suspect might be someone called
by the scheduler trying to take a busy lock.
2019-02-06 15:06:48 +01:00
Andreas Kling
e9f6508ada
Remove some unused files.
2019-02-05 15:36:26 +01:00
Andreas Kling
d459525725
AK: Vector::data() shouldn't crash if the vector is empty.
...
It's up to the caller to check size() and stay within the bounds.
2019-02-05 07:12:45 +01:00
Andreas Kling
612c02307e
AK: Add bounds assertions in Vector::operator[].
...
I was sure I had this already.
2019-02-05 06:37:03 +01:00
Andreas Kling
e88c8eae6a
AK: Fix leak in HashTable move assignment operator.
2019-02-04 08:53:12 +01:00
Andreas Kling
dddd0e7b03
Get nyancat nyanning in Serenity.
...
I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
2019-02-03 16:11:28 +01:00
Andreas Kling
7f91aec25c
Support font files.
...
This only works with the userspace build of SharedGraphics so far.
It's also very slow at loading fonts, but that's easy to fix.
Let's put fonts in /res/fonts/.
2019-02-02 23:13:12 +01:00
Andreas Kling
5e0b7f1a56
Add basic automatic dependency management to Makefiles.
2019-02-02 04:41:59 +01:00
Andreas Kling
95c3442d59
Implement event loop timers.
...
GObjects can now register a timer with the GEventLoop. This will eventually
cause GTimerEvents to be dispatched to the GObject.
This needed a few supporting changes in the kernel:
- The PIT now ticks 1000 times/sec.
- select() now supports an arbitrary timeout.
- gettimeofday() now returns something in the tv_usec field.
With these changes, the clock window in guitest2 finally ticks on its own.
2019-02-01 03:50:06 +01:00
Andreas Kling
ffab6897aa
Big, possibly complete sweep of naming changes.
2019-01-31 17:31:23 +01:00
Andreas Kling
3a4207b863
Fix dumb bug in HashTable::clear().
...
We forgot to clear the m_buckets pointer. This meant that multiple calls to
clear() would cause trouble.
2019-01-30 19:32:54 +01:00
Andreas Kling
b4e478aa50
Deallocate PTY's when they close.
...
This required a fair bit of plumbing. The CharacterDevice::close() virtual
will now be closed by ~FileDescriptor(), allowing device implementations to
do custom cleanup at that point.
One big problem remains: if the master PTY is closed before the slave PTY,
we go into crashy land.
2019-01-30 18:47:18 +01:00
Andreas Kling
027d26cd5d
Add a String::format() and use that in place of ksprintf() in the Kernel.
...
You're never gonna be right 100% of the time when guessing how much buffer
space you need. This avoids having to make that type of decision in a bunch
of cases. :^)
2019-01-30 16:28:51 +01:00
Andreas Kling
c30e2c8d44
Implement basic chmod() syscall and /bin/chmod helper.
...
Only raw octal modes are supported right now.
This patch also changes mode_t from 32-bit to 16-bit to match the on-disk
type used by Ext2FS.
I also ran into EPERM being errno=0 which was confusing, so I inserted an
ESUCCESS in its place.
2019-01-29 04:55:08 +01:00
Andreas Kling
cc906a2897
VFS: Resolve FIXME in Inode::read_entire() about using dynamic allocation.
2019-01-28 22:55:55 +01:00
Andreas Kling
7455f5ea42
Expose the kernel log buffer through /proc/dmesg.
...
Also add a /bin/dmesg program for convenience.
2019-01-28 22:40:55 +01:00
Andreas Kling
c7221b7dee
Painter: Tell the compiler to flatten Font::draw_glyph().
...
I think that concludes the Terminal stress test optimizations for now.
2019-01-27 05:23:04 +01:00
Andreas Kling
29dfb4ae13
Ext2FS: Factor out block list generation and writing into functions.
2019-01-23 03:03:44 +01:00
Andreas Kling
b75ee4aacb
Coding style fixes in AK.
2019-01-19 22:53:05 +01:00
Andreas Kling
7e044cf293
Add a simple /bin/sysctl that wraps the files in /proc/sys.
2019-01-18 15:35:38 +01:00
Andreas Kling
9d7da26b4e
StringBuilder: Use a ByteBuffer internally instead of a Vector<String>.
2019-01-18 03:27:51 +01:00
Andreas Kling
074edffc44
Add a simple StringBuilder::appendf() and use it for ProcFS.
...
Okay, now ProcFS doesn't crash due to the crappy buffer size estimates
not really working out. This thing has dogshit performance and I will
fix that separately.
2019-01-18 02:46:39 +01:00
Andreas Kling
e9e57c5f65
Rename SpinLock to Lock. It hasn't been a SpinLock for some time.
...
I'm pretty happy with the mechanism of AK::Lock for now.
2019-01-17 16:25:02 +01:00
Andreas Kling
b5c76d7559
Get rid of #ifdef SERENITY. We're past that phase of bootstrapping.
2019-01-17 01:41:36 +01:00
Andreas Kling
f651405694
Optimize the Painter::blit() loop a bit. ~3% fewer cycles, I'll take it.
2019-01-16 19:50:25 +01:00
Andreas Kling
f7ca6d254d
Tear out or duplicate what's unique for WindowServer from Widgets.
...
This turned into a huge refactoring that somehow also includes
making locks recursive/reentrant.
2019-01-16 16:03:50 +01:00