mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
15 lines
241 B
C++
15 lines
241 B
C++
#ifndef UNFAIR_TICKET_LOCK_H
|
|
#define UNFAIR_TICKET_LOCK_H
|
|
|
|
class spin_lock {
|
|
unsigned ticket;
|
|
void pause();
|
|
public:
|
|
spin_lock();
|
|
virtual ~spin_lock();
|
|
void lock();
|
|
void unlock();
|
|
};
|
|
|
|
#endif /* UNFAIR_TICKET_LOCK_H */
|