Skip to content

Commit

Permalink
Kernel: Simplify the ScopedSpinLock template
Browse files Browse the repository at this point in the history
We can just templatize the LockType here. This makes my Qt Creator
syntax highlighting work again. :^)
  • Loading branch information
awesomekling committed Jul 30, 2020
1 parent 949aef4 commit f2a152e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Kernel/Forward.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ class Region;
class Scheduler;
class SharedBuffer;
class Socket;
template <typename BaseType> class SpinLock;
template<typename BaseType>
class SpinLock;
class RecursiveSpinLock;
template <typename BaseType, typename LockType> class ScopedSpinLock;
template<typename LockType>
class ScopedSpinLock;
class TCPSocket;
class TTY;
class Thread;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/SpinLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class RecursiveSpinLock {
u32 m_recursions { 0 };
};

template<typename BaseType = u32, typename LockType = SpinLock<BaseType>>
template<typename LockType>
class ScopedSpinLock {
AK_MAKE_NONCOPYABLE(ScopedSpinLock);

Expand Down

0 comments on commit f2a152e

Please sign in to comment.