worker.h 913 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. extern pthread_mutex_t keysgenerated_mutex;
  2. extern volatile size_t keysgenerated;
  3. extern volatile int endwork;
  4. extern int yamloutput;
  5. extern int yamlraw;
  6. extern int numwords;
  7. extern size_t numneedgenerate;
  8. extern char *workdir;
  9. extern size_t workdirlen;
  10. // statistics, if enabled
  11. #ifdef STATISTICS
  12. struct statstruct {
  13. union {
  14. u32 v;
  15. size_t align;
  16. } numcalc;
  17. union {
  18. u32 v;
  19. size_t align;
  20. } numsuccess;
  21. union {
  22. u32 v;
  23. size_t align;
  24. } numrestart;
  25. } ;
  26. VEC_STRUCT(statsvec,struct statstruct);
  27. #endif
  28. #ifdef PASSPHRASE
  29. extern pthread_mutex_t determseed_mutex;
  30. extern u8 determseed[SEED_LEN];
  31. extern int pw_skipnear;
  32. extern int pw_warnnear;
  33. #endif
  34. extern void worker_init(void);
  35. extern char *makesname(void);
  36. extern size_t worker_batch_memuse(void);
  37. extern void *CRYPTO_NAMESPACE(worker_batch)(void *task);
  38. #ifdef PASSPHRASE
  39. extern void *CRYPTO_NAMESPACE(worker_batch_pass)(void *task);
  40. #endif