ladybird/AK
kleines Filmröllchen 6b13436ef6 LibCore: Introduce SharedSingleProducerCircularQueue
This new class with an admittedly long OOP-y name provides a circular
queue in shared memory. The queue is a lock-free synchronous queue
implemented with atomics, and its implementation is significantly
simplified by only accounting for one producer (and multiple consumers).
It is intended to be used as a producer-consumer communication
datastructure across processes. The original motivation behind this
class is efficient short-period transfer of audio data in userspace.

This class includes formal proofs of several correctness properties of
the main queue operations `enqueue` and `dequeue`. These proofs are not
100% complete in their existing form as the invariants they depend on
are "handwaved". This seems fine to me right now, as any proof is better
than no proof :^). Anyways, the proofs should build confidence that the
implemented algorithms, which are only roughly based on existing work,
operate correctly in even the worst-case concurrency scenarios.
2022-04-21 13:55:00 +02:00
..
.clang-tidy
AllOf.h
AnyOf.h
ArbitrarySizedEnum.h AK: Add an ArbitrarySizedEnum template 2022-03-27 18:54:56 +02:00
Array.h AK+Userland: Rename Array::front/back to first/last 2022-04-06 14:31:52 +02:00
Assertions.h AK: Suppress clang-tidy warning on TODO() 2022-02-21 19:01:16 +02:00
Atomic.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Badge.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Base64.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Base64.h AK+Userland: Make AK::decode_base64 return ErrorOr 2022-01-24 22:36:09 +01:00
BinaryBufferWriter.h
BinaryHeap.h
BinarySearch.h
BitCast.h
Bitmap.h AK: Make Bitmap construction OOM-fallible 2022-02-11 17:49:46 +02:00
BitmapView.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
BitStream.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Buffered.h Everywhere: Switch from EnableIf to requires 2022-03-17 22:15:42 -07:00
BuiltinWrappers.h
BumpAllocator.h
ByteBuffer.h AK: Don't call memcpy() in ByteBuffer::append(u8) 2022-02-13 14:44:36 +01:00
ByteReader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CharacterTypes.h AK: Change static base36 character map to function-local constexpr 2022-02-10 10:22:54 +00:00
Checked.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CheckedFormatString.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CircularDeque.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CircularDuplexStream.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CircularQueue.h AK: Add non-const iterator for CircularQueue 2022-04-03 09:49:08 -07:00
CMakeLists.txt
Complex.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Concepts.h AK: Add a OneOfIgnoringCV concept 2022-04-20 00:15:23 +04:30
DateConstants.h Everywhere: Deduplicate day/month name constants 2022-03-18 23:48:50 +00:00
DateTimeLexer.h
Debug.h.in LibCore: Introduce SharedSingleProducerCircularQueue 2022-04-21 13:55:00 +02:00
Demangle.h AK: Remove kfree definition 2022-01-16 11:18:04 +01:00
DisjointChunks.h AK: Skip over initial empty chunks in DisjointChunks 2022-02-27 00:11:14 +03:30
DistinctNumeric.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
DoublyLinkedList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Endian.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EnumBits.h
Error.h AK: VERIFY inside release_value_but_fixme_should_propagate_errors() 2022-02-16 19:49:41 -05:00
ExtraMathConstants.h
FileStream.h
Find.h
FixedArray.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FixedPoint.h AK: Add FixedPoint base 2 logarithm 2022-02-28 13:59:31 +01:00
FlyString.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FlyString.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Format.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Format.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Forward.h AK: Add forward declaration for Utf8CodePointIterator 2022-02-23 21:53:30 +00:00
Function.h
FuzzyMatch.h AK: Add FuzzyMatch header 2022-04-20 18:34:09 +02:00
GenericLexer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
GenericLexer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
HashFunctions.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
HashMap.h AK: Return Optional<ConstPeekType> for HashMap::get() const 2022-04-04 12:48:31 +02:00
HashTable.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Hex.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Hex.h AK: Return KString instead of String from encode_hex in the Kernel 2022-02-16 22:21:37 +01:00
IDAllocator.h
IntegralMath.h AK: Move integral log2 and exp to IntegerMath.h 2022-02-06 17:52:33 +00:00
IntrusiveDetails.h
IntrusiveList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IntrusiveListRelaxedConst.h
IntrusiveRedBlackTree.h AK: Expose RedBlackTree::find_smallest_not_below() 2022-04-21 13:16:56 +02:00
IPv4Address.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv6Address.h AK: Add Kernel namespace to KStrings in AK::IPv6Address 2022-04-17 16:57:52 -07:00
IterationDecision.h
Iterator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonArray.h Everywhere: Make JSON serialization fallible 2022-02-27 20:37:57 +01:00
JsonArraySerializer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonObject.h Everywhere: Make JSON serialization fallible 2022-02-27 20:37:57 +01:00
JsonObjectSerializer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonParser.cpp AK: Fix userland parsing of rounded floating point numbers 2022-02-16 07:22:51 -05:00
JsonParser.h AK: Remove unused String[256] from JsonParser 2022-03-10 18:43:09 +01:00
JsonPath.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonPath.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonValue.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonValue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
kmalloc.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
kmalloc.h AK+Kernel: Avoid double memory clearing of HashTable buckets 2022-03-15 11:56:46 +01:00
kstdio.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LEB128.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LexicalPath.cpp
LexicalPath.h
MACAddress.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Math.h AK: Add generic sincos solution for non-x86 platforms 2022-04-03 00:31:41 +01:00
MemMem.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Memory.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MemoryStream.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NeverDestroyed.h
NoAllocationGuard.h Everywhere: Use my new serenityos.org e-mail :^) 2022-01-14 11:54:09 +01:00
Noncopyable.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonnullOwnPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonnullOwnPtrVector.h
NonnullPtrVector.h LibWeb: Make reverse iterators work for const NonnullPtrVectors 2022-04-13 19:52:25 +02:00
NonnullRefPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonnullRefPtrVector.h
NumberFormat.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NumericLimits.h
Optional.h AK: Allow Optional<T&> to exist 2022-04-04 12:48:31 +02:00
OwnPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Platform.h AK: Allow alignment to cache line size with CACHE_ALIGNED 2022-04-21 13:55:00 +02:00
PrintfImplementation.h AK: Differ between long and long long formats 2022-04-14 03:12:56 +04:30
Ptr32.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Queue.h
QuickSort.h
Random.cpp
Random.h
RecursionDecision.h
RedBlackTree.h AK: Expose RedBlackTree::find_smallest_not_below() 2022-04-21 13:16:56 +02:00
RefCounted.h AK+Kernel: Remove one_ref_left() footgun 2022-01-11 01:12:16 +01:00
RefCountForwarder.h
RefPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Result.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ReverseIterator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SIMD.h
SIMDExtras.h LibGL+LibSoftGPU: Implement the stencil buffer 2022-01-17 12:49:00 +01:00
SIMDMath.h AK: Add vector variants of sqrt and rsqrt 2022-04-02 18:37:38 +02:00
Singleton.h AK: Yield while waiting for another thread to initialize a Singleton 2022-01-19 01:28:13 +01:00
SinglyLinkedList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SinglyLinkedListWithCount.h
SourceGenerator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SourceLocation.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Span.h AK: Add last() utility function to Span 2022-04-02 21:50:41 +02:00
Stack.h
StackInfo.cpp
StackInfo.h
Statistics.h
StdLibExtraDetails.h AK: Add a OneOfIgnoringCV concept 2022-04-20 00:15:23 +04:30
StdLibExtras.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Stream.h
String.cpp AK: Explicitly instantiate String::to_uint<unsigned long{, long}>() 2022-04-20 00:15:23 +04:30
String.h AK: Remove KERNEL check from String 2022-04-10 12:08:31 +02:00
StringBuilder.cpp AK: Add a try variant of StringBuilder::append_escaped_for_json 2022-02-27 20:37:57 +01:00
StringBuilder.h AK: Add a try variant of StringBuilder::append_escaped_for_json 2022-02-27 20:37:57 +01:00
StringHash.h AK: Define a traits helper for case-insensitive StringView hashing 2022-01-11 00:36:45 +01:00
StringImpl.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringImpl.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringUtils.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringUtils.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringView.cpp AK: Add StringView::copy_characters_to_buffer() 2022-04-03 19:15:14 +02:00
StringView.h AK: Add StringView::copy_characters_to_buffer() 2022-04-03 19:15:14 +02:00
TemporaryChange.h
Time.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Time.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Traits.h AK: Add missing include to Traits.h 2022-04-10 19:18:16 +02:00
Trie.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Try.h AK: Mark the error branch of the TRY() macro as unlikely 2022-01-16 02:01:23 +02:00
Tuple.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TypeCasts.h
TypedTransfer.h
TypeList.h
Types.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UBSanitizer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UFixedBigInt.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UnicodeUtils.h AK: Remove now-unused AK::UnicodeUtils methods 2022-01-18 15:13:25 +00:00
URL.cpp AK: Add URL::create_with_help_scheme helper function 2022-04-21 09:12:37 +04:30
URL.h AK: Add URL::create_with_help_scheme helper function 2022-04-21 09:12:37 +04:30
URLParser.cpp AK: Don't destructively re-encode query strings in the URL parser 2022-04-10 01:37:45 +02:00
URLParser.h
Userspace.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Utf8View.cpp AK: Invalidate UTF-8 encoded code points larger than U+10ffff 2022-04-05 00:14:29 +01:00
Utf8View.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Utf16View.cpp AK: Add a Utf16View::code_unit_offset_of(Utf16CodePointIterator) helper 2022-01-31 21:05:04 +02:00
Utf16View.h AK: Add a Utf16View::code_unit_offset_of(Utf16CodePointIterator) helper 2022-01-31 21:05:04 +02:00
Utf32View.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UUID.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UUID.h AK+Kernel: Return KString from UUID::to_string() in the Kernel 2022-02-16 22:21:37 +01:00
Variant.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Vector.h AK: Make Vector::contains_slow templated 2022-04-21 09:12:37 +04:30
Weakable.h Everywhere: Switch from EnableIf to requires 2022-03-17 22:15:42 -07:00
WeakPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00