setup project for assignment 3

This commit is contained in:
2021-01-08 16:01:54 +01:00
parent 51b54f68fb
commit 2f9f32e50e
13 changed files with 268 additions and 0 deletions

26
Assignment_3/lib/Node.h Normal file
View File

@@ -0,0 +1,26 @@
#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();
};