1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-13 19:32:17 +00:00
serenity/Libraries
Tom 75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
..
LibAudio LibAudio: Use new format functions. 2020-10-17 23:20:31 +02:00
LibC Kernel+LibC: Add adjtime(2) 2020-11-10 19:03:08 +01:00
LibChess LibChess: Forbid King moving into check by a pawn on the home rank 2020-10-30 16:51:41 +01:00
LibCompress Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibCore AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
LibCpp LibCpp: Add library for working with c++ code 2020-09-30 21:46:59 +02:00
LibCrypt Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
LibCrypto LibCrypto: Remove spammy ModPow debug log 2020-10-30 23:42:03 +01:00
LibDebug LibDebug: Use move semantics when populating abbreviations map 2020-11-08 23:05:34 +01:00
LibDesktop Meta+LibC through LibHTTP: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
LibDiff LibDiff: Add library for working with diffs 2020-09-15 21:43:29 +02:00
LibELF Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
LibGemini LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLS 2020-10-30 23:42:03 +01:00
LibGfx LibGfx: Add methods to serialise and deserialise a Bitmap 2020-11-08 21:46:13 +01:00
LibGUI AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
LibHTTP LibProtocol+LibGemini+LibHTTP: Provide root certificates to LibTLS 2020-10-30 23:42:03 +01:00
LibImageDecoderClient AK: Add trivial structure validation to SharedBuffer 2020-10-02 15:38:07 +02:00
LibIPC LibIPC: Add support for passing around ByteBuffers and HashMap<K, V> 2020-11-08 21:46:13 +01:00
LibJS LibJS: Throw RuntimeError when reaching the end of the stack 2020-11-08 16:51:54 +01:00
LibKeyboard Kernel+LibKeyboard: Store the keymap name when setting system keymap 2020-08-06 17:45:06 +02:00
LibLine Shell+LibLine: Support HISTCONTROL environment variable 2020-10-26 11:27:54 +01:00
LibM Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
LibMarkdown LibMarkdown: Use JS::MarkupGenerator for "js" code blocks :^) 2020-10-31 20:52:54 +01:00
LibPCIDB LibPCIDB: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
LibProtocol AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
LibPthread Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
LibTar Userland: tar: support extracting gzipped files 2020-10-04 00:16:40 +02:00
LibTextCodec LibTextCodec: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
LibThread HackStudio: Detach from debugged process before terminating 2020-09-26 17:18:21 +02:00
LibTLS LibTLS: (Almost) verify certificate chain against root CA certificates 2020-10-30 23:42:03 +01:00
LibUnwind Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
LibVT LibVT: Add TerminalWidget::scroll_to_bottom() API 2020-11-10 11:55:12 +01:00
LibWeb AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
LibX86 Everywhere: Redundant inline specifier on constexpr functions (#3807) 2020-10-20 18:08:13 +02:00
CMakeLists.txt LibTar: Create LibTar and TarStream 2020-10-04 00:16:40 +02:00