Commit graph

3 commits

Author SHA1 Message Date
Brian Gianforcaro bb1fa019de Kernel: Allow MutexLocker to be conditionally initialized
There are cases where we want to conditionally take a lock, but still
would like to use an RAII type to make sure we don't leak the lock.

This was previously impossible to do with `MutexLocker` due to it's
design. This commit tweaks the design to allow the object to be
initialized to an "empty" state without a lock associated, so it does
nothing, and then later a lock can be "attached" to the locker.

I realized that the get_lock() API's where also unused, and would no
longer make sense for empty locks, so they were removed.
2021-07-20 03:21:14 +02:00
Andreas Kling 9457d83986 Kernel: Rename Locker => MutexLocker 2021-07-18 01:53:04 +02:00
Andreas Kling cee9528168 Kernel: Rename Lock to Mutex
Let's be explicit about what kind of lock this is meant to be.
2021-07-17 21:10:32 +02:00
Renamed from Kernel/Lock.h (Browse further)