-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththread_info.h
More file actions
43 lines (26 loc) · 748 Bytes
/
Copy paththread_info.h
File metadata and controls
43 lines (26 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Created by michal on 26.09.17.
//
#ifndef PROJECT_THREAD_H
#define PROJECT_THREAD_H
#include <thread>
#include "executor.h"
static std::hash<std::thread::id> hasher;
class ThreadInfo {
public:
explicit ThreadInfo(Executor executor, uint32_t call_address) : executor(executor), call_address(call_address) {}
void operator()();
void set_executed_bit(int executed_bit);
void process_function();
bool check_thread_end();
void execution();
void set_thread_id(std::thread::id thread_id);
std::thread::id get_thread_id();
private:
int executed_bit = 0;
Executor executor;
uint32_t call_address;
bool thread_end = false;
std::thread::id thread_id;
};
#endif //PROJECT_THREAD_H