summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-02-03Make font loading use mmap().Andreas Kling
This exposed a serious race condition in page_in_from_inode(). Reordered the logic and added a paging lock to VMObject. Now, only one process can page in from a VMObject at a time. There are definitely ways to optimize this, for instance by making the locking be per-page instead. It's not something that I'm going to worry about right now though.
2019-02-02Start working on a simple graphical font editor.Andreas Kling
Editing fonts by editing text files is really slow and boring. A simple font editor seems like a good way to take LibGUI for a spin.
2019-02-02Add basic automatic dependency management to Makefiles.Andreas Kling
2019-02-01Kernel: VFS::open/create should take base Inode& instead of InodeIdentifier.Andreas Kling
2019-02-01Kernel: mkdir() should use the containing directory's FS for inode creation.Andreas Kling
2019-02-01Kernel: mkdir() should fail if the pathname is empty.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-31LibC: Add mktime().Andreas Kling
2019-01-31Kernel: Make Process a Weakable class.Andreas Kling
Use this to fix a use-after-free in ~GraphicsBitmap(). We'd hit this when the WindowServer was doing a deferred destruction of a WSWindow whose backing store referred to a now-reaped Process.
2019-01-31Kernel: Include absolute paths of mount points in /proc/mountsAndreas Kling
2019-01-31Add uid and gid to CharacterDevices.Andreas Kling
The vast majority of them will be owned by 0:0 (the default.) However, PTY pairs will now be owned by the uid:gid of the opening process.
2019-01-31Make stat() work on device files again.Andreas Kling
FileDescriptor will now keep a pointer to the original inode even after opening it resolves to a character device. Fixed up /bin/ls to display major and minor device numbers instead of size for device files.
2019-01-31Ext2FS: Remove an unnecessary heap allocation in create_inode().Andreas Kling
2019-01-31Kernel: Actually zero-fill eagerly committed regions.Andreas Kling
Previously, calling Region::commit() would make sure to allocate any missing physical pages, but they would contain uninitialized data. This was very obvious when allocating GraphicsBitmaps as they would have garbage pixels rather than being filled with black. The MM quickmap mechanism didn't work when operating on a non-active page directory (which happens when we're in the middle of exec, for example.) This patch changes quickmap to reside in the shared kernel page directory. Also added some missing clobber lists to inline asm that I stumbled on.
2019-01-31Remove the last remaining #ifndef SERENITY blocks.Andreas Kling
2019-01-30Add support for keyboard arrow keys.Andreas Kling
Also have them send the appropriate escape sequences in Terminal. Basic history browsing now works in bash. How nice! :^)
2019-01-30Rename the default user to "anon" and give him a home directory.Andreas Kling
2019-01-30Kernel: Don't try to dump invalid code memory in page fault handler.Andreas Kling
2019-01-30LibGUI: Implement destroying individual windows without exiting the process.Andreas Kling
2019-01-30Destroy all remaining windows in a process when it dies.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-30Let the slave PTY keep the master PTY alive.Andreas Kling
This ownership model is a bit confusing. There's a retain cycle between MasterPTY and SlavePTY, but it's broken when the SlavePTY is closed, meaning that there are no more FileDescriptors referring to it.
2019-01-30Kernel: select() should fail with EBADF if any set contains an invalid fd.Andreas Kling
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-30Add a /dev/pts filesystem and make PTY allocation dynamic.Andreas Kling
You can now open as many PTY pairs as you like. Well, it's actually capped at 8 for now, but it's just a constant and trivial to change. Unregistering a PTY pair is untested because I didn't want to start mucking with that in Terminal right now.
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-28Kernel: Remove outdated FIXME.Andreas Kling
2019-01-28Expose the kernel log buffer through /proc/dmesg.Andreas Kling
Also add a /bin/dmesg program for convenience.
2019-01-28Add support for removing directories.Andreas Kling
It's really only supported in Ext2FS since SynthFS doesn't really want you mucking around with its files. This is pretty neat though :^) I ran into some trouble with HashMap while working on this but opted to work around it and leave that for a separate investigation.
2019-01-28.bochsrc: Toggle mouse grab with ctrl-alt (works nicer on 1-button mice.)Andreas Kling
2019-01-27Kernel: Unbreak symbolication yet another time.Andreas Kling
2019-01-27Kernel: Move RAM size detection to MemoryManager and use what we learn.Andreas Kling
2019-01-27Make buttons unpress when the cursor leaves the button rect.Andreas Kling
Implement this functionality by adding global cursor tracking. It's currently only possible for one GWidget per GWindow to track the cursor.
2019-01-27Userland: Make a simple /bin/cp for copying files.Andreas Kling
2019-01-27Make .bochsrc work with the stock Bochs on Ubuntu.Andreas Kling
2019-01-26LibGUI: Start bringing up GTextBox in the standalone world.Andreas Kling
2019-01-26WindowServer: Rename the two painting phases.Andreas Kling
Work now happens in terms of two messages: - WM_ClientWantsToPaint - WM_ClientFinishedPaint This feels fairly obvious compared to the old Paint/Invalidate.
2019-01-26WindowServer: More event -> message renaming.Andreas Kling
2019-01-26WindowServer: Rename WSEvent to WSMessage.Andreas Kling
Also do the same for WSMessageLoop and WSMessageReceiver. More to come.
2019-01-26Refactor GUI rendering model to be two-phased.Andreas Kling
Instead of clients painting whenever they feel like it, we now ask that they paint in response to a paint message. After finishing painting, clients notify the WindowServer about the rect(s) they painted into and then flush eventually happens, etc. This stuff leaves us with a lot of badly named things. Need to fix that.
2019-01-25Let's not auto-start guitest. guitest2 is so much more useful.Andreas Kling
2019-01-25Keyboard: Shift+backspace should generate backspace character.Andreas Kling
2019-01-25Kernel: Implement lazy FPU state restore.Andreas Kling
2019-01-25Kernel: Fix Syscall.h build when out of context.Andreas Kling
2019-01-25Snazz up the windows with some title bar gradients. :^)Andreas Kling
2019-01-25Terminal: Redraw entire line if any of its characters are dirty.Andreas Kling
This means we only have to do one fill_rect() per line and the whole process ends up being ~10% faster than before. Also added a read_tsc() syscall to give userspace access to the TSC.
2019-01-25Kernel: Fix incorrect EFAULTs when syscall would write into COW pages.Andreas Kling