summaryrefslogtreecommitdiff
path: root/AK
AgeCommit message (Collapse)Author
2019-02-04AK: Fix leak in HashTable move assignment operator.Andreas Kling
2019-02-03Get nyancat nyanning in Serenity.Andreas Kling
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-02Support font files.Andreas Kling
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-02Add basic automatic dependency management to Makefiles.Andreas Kling
2019-02-01Implement event loop timers.Andreas Kling
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-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2019-01-30Fix dumb bug in HashTable::clear().Andreas Kling
We forgot to clear the m_buckets pointer. This meant that multiple calls to clear() would cause trouble.
2019-01-30Deallocate PTY's when they close.Andreas Kling
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-30Add a String::format() and use that in place of ksprintf() in the Kernel.Andreas Kling
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-29Implement basic chmod() syscall and /bin/chmod helper.Andreas Kling
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-28VFS: Resolve FIXME in Inode::read_entire() about using dynamic allocation.Andreas Kling
2019-01-28Expose the kernel log buffer through /proc/dmesg.Andreas Kling
Also add a /bin/dmesg program for convenience.
2019-01-27Painter: Tell the compiler to flatten Font::draw_glyph().Andreas Kling
I think that concludes the Terminal stress test optimizations for now.
2019-01-23Ext2FS: Factor out block list generation and writing into functions.Andreas Kling
2019-01-19Coding style fixes in AK.Andreas Kling
2019-01-18Add a simple /bin/sysctl that wraps the files in /proc/sys.Andreas Kling
2019-01-18StringBuilder: Use a ByteBuffer internally instead of a Vector<String>.Andreas Kling
2019-01-18Add a simple StringBuilder::appendf() and use it for ProcFS.Andreas Kling
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-17Rename SpinLock to Lock. It hasn't been a SpinLock for some time.Andreas Kling
I'm pretty happy with the mechanism of AK::Lock for now.
2019-01-17Get rid of #ifdef SERENITY. We're past that phase of bootstrapping.Andreas Kling
2019-01-16Optimize the Painter::blit() loop a bit. ~3% fewer cycles, I'll take it.Andreas Kling
2019-01-16Tear out or duplicate what's unique for WindowServer from Widgets.Andreas Kling
This turned into a huge refactoring that somehow also includes making locks recursive/reentrant.
2019-01-14Always inline the locks.Andreas Kling
2019-01-14Add Vector::take_first().Andreas Kling
2019-01-13Add basic GUI API for creating labels and buttons.Andreas Kling
2019-01-13Fix Userland build.Andreas Kling
2019-01-12Optimize WindowManager::flush() with fast_dword_copy().Andreas Kling
2019-01-12Add a Vector::clear_with_capacity() that doesn't release the backing store.Andreas Kling
Use this for WindowManager's dirty rects to avoid kmalloc traffic.
2019-01-09More window manager hacking. FocusIn/FocusOut events.Andreas Kling
2019-01-09Start refactoring graphics system to have per-window backing stores.Andreas Kling
It was fun for everyone to share a single framebuffer but it was also kinda really awful. Let's move towards having a "GraphicsBitmap" as the backing store for each Window. This is going to need a lot of refactoring so let's get started.
2019-01-01Ext2FS: Free Ext2FSInodes when the last user releases them.Andreas Kling
The inode cache was keeping these alive forever. Added a cute little magic trick to Retainable that calls T::one_retain_left() when the retain count is decremented to 1.
2018-12-31Make PageDirectory store physical pages in a HashMap.Andreas Kling
This container is really just there to keep a retain on the individual PhysicalPages for each page table. A HashMap does the job with far greater space efficiency.
2018-12-28Plug leaks in SynthFS::remove_file().Andreas Kling
The process spawn stress test can now run forever. :^)
2018-12-26Fix some issues uncovered by the spawn stress test.Andreas Kling
2018-12-21Remove FS::read_entire_inode() in favor of Inode::read_entire().Andreas Kling
2018-12-21Yet another pass of style fixes.Andreas Kling
2018-12-19Automatically call Inode::flush_metadata() before an Inode is destroyed.Andreas Kling
Use a little template magic to have Retainable::release() call out to T::will_be_destroyed() if such a function exists before actually calling the destructor. This gives us full access to virtual functions in the pre-destruction code.
2018-12-05Support inserting a newline.Andreas Kling
2018-12-04Import a simple text editor I started working on.Andreas Kling
2018-12-03Yet more coding style fixes.Andreas Kling
2018-12-03Move InlineLinkedList to AK.Andreas Kling
2018-12-03Implement basic support for times().Andreas Kling
The kernel now bills processes for time spent in kernelspace and userspace separately. The accounting is forwarded to the parent process in reap(). This makes the "time" builtin in bash work.
2018-12-03More coding style changes.Andreas Kling
2018-12-02Use decltype(sizeof(void*)) as a facsimile for std::size_t.Andreas Kling
Clang demands that the size argument to the various operator new()'s to be exactly whatever it thinks std::size_t is. Since we can't include STL headers, this little trick will do.
2018-12-02Make it possible to build the Kernel on a macOS host.Andreas Kling
It still requires an ELF compiler and linker, but at least it builds. I need to get rid of the "Unix" namespace. This does a lot of that.
2018-11-28Let reap() communicate the dead process's exit status to the caller.Andreas Kling
This way the scheduler doesn't need to plumb the exit status into the waiter. We still plumb the waitee pid though, I don't love it but it can be fixed.
2018-11-18Fix mkdir with relative paths.Andreas Kling
2018-11-18Finally hook up the mkdir code to a syscall.Andreas Kling
Added a /bin/mkdir that makes directories. How very neat :^) There are various limitations because of missing functionality.
2018-11-16Add a DoubleBuffer thingy to allow TTY read/write to be interleaved.Andreas Kling
I feel like this concept might be useful in more places. It's very naive right now and uses dynamically growing buffers. It should really use static size buffers and never kmalloc().
2018-11-13Make page_in_from_vnode 2x faster.Andreas Kling
...by adding a new class called Ext2Inode that inherits CoreInode. The idea is that a vnode will wrap a CoreInode rather than InodeIdentifier. Each CoreInode subclass can keep whatever caches they like. Right now, Ext2Inode caches the list of block indices since it can be very expensive to retrieve.