forked from cathugger/mkp224o
-
Notifications
You must be signed in to change notification settings - Fork 0
/
worker.h
49 lines (41 loc) · 948 Bytes
/
worker.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
extern pthread_mutex_t keysgenerated_mutex;
extern volatile size_t keysgenerated;
extern volatile int endwork;
extern int yamloutput;
extern int yamlraw;
extern int numwords;
extern size_t numneedgenerate;
extern char *workdir;
extern size_t workdirlen;
// statistics, if enabled
#ifdef STATISTICS
struct statstruct {
union {
u32 v;
size_t align;
} numcalc;
union {
u32 v;
size_t align;
} numsuccess;
union {
u32 v;
size_t align;
} numrestart;
} ;
VEC_STRUCT(statsvec,struct statstruct);
#endif
#ifdef PASSPHRASE
extern pthread_mutex_t determseed_mutex;
extern u8 determseed[SEED_LEN];
#endif
extern void worker_init(void);
extern char *makesname(void);
extern size_t worker_batch_memuse(void);
extern void *worker_slow(void *task);
extern void *worker_fast(void *task);
extern void *worker_batch(void *task);
#ifdef PASSPHRASE
extern void *worker_fast_pass(void *task);
extern void *worker_batch_pass(void *task);
#endif