-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon.h
55 lines (48 loc) · 1.15 KB
/
common.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
/*
* common.h
*/
#ifndef __COMMON_H
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
/*
* Process/ Thread States
*/
#define STATE_INIT 0
#define STATE_RUNNING 1
#define STATE_WAIT_BARRIER 2
#define STATE_FINISHED 3
#define TEST_TYPE_CREATE 0
#define TEST_TYPE_APPEND 1
#define TEST_TYPE_OVERWRITE 2
#define TEST_TYPE_APPENDCLOSE 3
struct f_thr_args {
int id;
int id_max;
int type; // test type
int count; // test count
long fsize; // File size
long wsize; // Write size
int gran; // Granularity
long fnum; // Number of files
char *path;
char *serv_ip;
int port;
int socket;
struct sockaddr_in *serv_addr;
};
u_int64_t rdtsc(void);
void bar_init(int num);
void bar_wait(int id);
void *fio_thread(void *fio_args);
/*
* Shared objects
*/
extern int *ft_state;
extern int progress;
extern char s_char;
extern int use_net;
struct sockaddr_in serv_addr;
#endif /* __COMMON_H */