mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
26 lines
460 B
C++
26 lines
460 B
C++
#pragma once
|
|
|
|
#include <mutex>
|
|
|
|
class Node {
|
|
protected:
|
|
int data;
|
|
bool dummy;
|
|
std::mutex mut;
|
|
|
|
public:
|
|
Node* next;
|
|
bool deleted;
|
|
|
|
Node(int element);
|
|
static Node* Dummy();
|
|
// Dummy();
|
|
|
|
void lock();
|
|
void unlock();
|
|
bool is_smaller_than(int n);
|
|
bool is_smaller_than(Node* n);
|
|
bool is_equal(int n);
|
|
bool is_dummy();
|
|
int get_data();
|
|
}; |