-
Notifications
You must be signed in to change notification settings - Fork 0
/
driver.h
69 lines (46 loc) · 960 Bytes
/
driver.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef DRIVER_HH
#define DRIVER_HH
#include <inttypes.h>
#include <pthread.h>
#include "commands.h"
struct list;
struct list {
char *val;
struct list * next;
};
typedef struct list List;
int
withinBoundary(uint32_t index, uint32_t val);
uint32_t*
genIndices(int numTests, int socket);
uint32_t
genNextIndex(uint32_t *acc, int numDone);
int
isValidIndex(uint32_t *acc, int numDone, uint32_t curr);
List*
insert(List *start, char *val);
void
errorArg();
int
str2int(char *str);
int
parseNum(char **given_str);
int
listSize(List *start, int cur);
int
startRandoms(List *randoms, pthread_t **randomThreads, testCommand **randomCommands);
void
startTests(List *tests);
void
writeAnswers(int from, int to, long double *results);
void
run(List *tests, List *randoms);
extern void*
runTest(void *arg);
extern void*
randomActivity(void *arg);
extern void*
alloc_mem(size_t size, int socket);
extern void*
runTestSecond(void *arg);
#endif