mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
Create header file for Node
This commit is contained in:
24
Assignment_2/lib/Node.h
Normal file
24
Assignment_2/lib/Node.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
|
||||
class Node {
|
||||
protected:
|
||||
int data;
|
||||
bool is_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);
|
||||
};
|
||||
Reference in New Issue
Block a user