kernel/scheduler: Mark SchedulerLock constructor as nodiscard

Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
pull/8/head
Lioncash 5 years ago
parent e050594706
commit f808258ed9

@ -289,7 +289,7 @@ private:
class SchedulerLock { class SchedulerLock {
public: public:
explicit SchedulerLock(KernelCore& kernel); [[nodiscard]] explicit SchedulerLock(KernelCore& kernel);
~SchedulerLock(); ~SchedulerLock();
protected: protected:

Loading…
Cancel
Save