summaryrefslogtreecommitdiff
path: root/Kernel/Library
AgeCommit message (Collapse)Author
2021-10-15Kernel: Split ScopedCritical so header is platform independentJames Mintram
A new header file has been created in the Arch/ folder while the implementation has been moved into a CPP living in the X86 folder.
2021-10-14Kernel: Add per platform Processor.h headersJames Mintram
The platform independent Processor.h file includes the shared processor code and includes the specific platform header file. All references to the Arch/x86/Processor.h file have been replaced with a reference to Arch/Processor.h.
2021-10-07Kernel: Note if the page fault address is a destroyed smart pointerLuke Wilde
While I was working on LibWeb, I got a page fault at 0xe0e0e0e4. This indicates a destroyed RefPtr if compiled with SANITIZE_PTRS defined. However, the page fault handler didn't print out this indication. This makes the page fault handler print out a note if the faulting address looks like a recently destroyed RefPtr, OwnPtr, NonnullRefPtr, NonnullOwnPtr, ThreadSafeRefPtr or ThreadSafeNonnullRefPtr. It will only do this if SANITIZE_PTRS is defined, as smart pointers don't get scrubbed without it being defined.
2021-10-07AK+Kernel: Make automatically locking RefPtr & co a kernel-only thingAndreas Kling
Some time ago, automatic locking was added to the AK smart pointers to paper over various race conditions in the kernel. Until we've actually solved the issues in the kernel, we're stuck with the locking. However, we don't need to punish single-threaded userspace programs with the high cost of locking. This patch moves the thread-safe variants of RefPtr, NonnullRefPtr, WeakPtr and RefCounted into Kernel/Library/.
2021-09-07Kernel: Stop leaking TmpFS inodesAndreas Kling
TmpFS inodes rely on the call to Inode::one_ref_left() to unregister themselves from the inode cache in TmpFS. When moving various kernel classes to ListedRefCounted for safe unref() while participating on lists, I forgot to make ListedRefCounted check for (and call) one_ref_left() & will_be_destroyed() on the CRTP class.
2021-08-22Kernel: Rename SpinLock => SpinlockAndreas Kling
2021-08-22Kernel: Rename SpinLockProtectedValue<T> => SpinLockProtected<T>Andreas Kling
2021-08-17Kernel: Add a little explainer comment to ListedRefCountedAndreas Kling
2021-08-17Kernel: Add ListedRefCounted<T> template classAndreas Kling
This class implements the emerging "ref-counted object that participates in a lock-protected list that requires safe removal on unref()" pattern as a base class that can be inherited in place of RefCounted<T>.