mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-21 19:12:42 +02:00
14 lines
324 B
C++
14 lines
324 B
C++
#pragma once
|
|
#include <switch.h>
|
|
#include <atomic>
|
|
#include <vector>
|
|
|
|
class WaitableManagerBase {
|
|
std::atomic<u64> cur_priority;
|
|
public:
|
|
WaitableManagerBase() : cur_priority(0) { }
|
|
|
|
u64 get_priority() {
|
|
return std::atomic_fetch_add(&cur_priority, (u64)1);
|
|
}
|
|
}; |