Commit graph

8 commits

Author SHA1 Message Date
Ben Wiederhake
bee08a4b9f Kernel: More PID/TID typing 2020-08-10 11:51:45 +02:00
Muhammad Zahalqa
91d259ef1c
LibThread: Remove redundant --m_level in Lock::unlock() (#3040) 2020-08-07 17:24:49 +02:00
Muhammad Zahalqa
5fe6c13e5b
LibThread: Remove redundant r/w of atomic variable in Lock::lock() (#3013)
m_holder.compare_exchange_strong(expected, desired, ...)
will either successfully update the value to desired if == expected
or put the current value in expected otherwise.
2020-08-06 17:50:25 +02:00
Andreas Kling
888e35f0fe AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros
It's tedious to write (and look at) [[gnu::always_inline]] etc. :^)
2020-04-30 11:43:25 +02:00
Andreas Kling
94647fa4ab LibThread: Simplify the userspace Lock to remove CAS on unlock()
Instead of using a separate synchronization variable, just use the lock
holder TID for synchronization. This way, we only need to CAS when
first acquiring a lock.
2020-04-13 12:33:42 +02:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
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.
2020-01-18 09:45:54 +01:00
Tom
b0773a8ea6 AK: Add Atomic.h
Use gcc built-in atomics
2019-10-12 19:30:59 +02:00
Sergey Bugaev
3439a479af LibThread: Move CLock to LibThread::Lock
And adapt all the code that uses it.
2019-08-26 11:31:14 +02:00
Renamed from Libraries/LibCore/CLock.h (Browse further)