Age | Commit message (Collapse) | Author |
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
|
|
We use atomic_signal_fence and atomic_thread_fence together to prevent
reordering of memory accesses by the CPU and the compiler.
The usage of these functions was suggested by @tomuta so we can be sure
that important memory accesses happen in the expected order :)
|
|
This allows us to perform atomic operations on potentially unsafe
user space pointers.
|
|
This is useful for collecting statistics, e.g.
Atomic<unsigned, MemoryOrder::memory_order_relaxed> would allow
using operators such as ++ to use relaxed semantics throughout
without having to explicitly call fetch_add with the memory order.
|
|
|
|
All CAS operations should always check return values, so they are
robust to failure in the event of conflict in parallel operation.
|
|
|
|
|
|
This allows for using atomic operations on any variables,
not only those wrapped in AK::Atomic<T>
|
|
This reverts commit aff594f1e790feff0cd7dda3e9f0ecd5573c51bf.
|
|
This is distintly different from Atomic<T*>, because we want to
atomically access a variable that the atomic object itself does not own.
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
Also use <AK/Types.h> instead of <stddef.h>
|
|
|
|
Use gcc built-in atomics
|