-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextern_module.h
More file actions
49 lines (38 loc) · 1.58 KB
/
extern_module.h
File metadata and controls
49 lines (38 loc) · 1.58 KB
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
#ifndef EXTERN_MODULE_H
#define EXTERN_MODULE_H
#include <pthread.h>
#include "sync_queue.h"
#include "jsd.h"
#include "wf_table.h"
#include "wf_repo.h"
/** the suffix */
extern char *file_suffix;
/** the mutex's that protect access to no_waiting_dirs and no_waiting_files as well as the flags */
extern pthread_mutex_t dir_term_mutex;
extern pthread_mutex_t file_term_mutex;
/** track number of waiting directory threads and file threads */
extern unsigned int no_waiting_dirs;
extern unsigned int no_waiting_files;
extern unsigned int no_dir_threads;
extern unsigned int no_file_threads;
/** conditional variables for use in signalling and waiting the directory threads, and file threads */
extern pthread_cond_t cond_dir;
extern pthread_cond_t cond_file;
/** flags that will let the threads determine whether to terminate or not */
extern unsigned int dir_threads_terminate;
/** the directory and file queues that should be shared with all directory and file threads */
extern sync_queue *directory_queue;
extern sync_queue *file_queue;
/** the wf repo that will be populated in the collection phase and utilized in the analysis phase */
extern wf_repo *wf_stack;
/** pointers to wf_tables to help in the jsd/analysis work assigning portion */
extern wf_table *x;
extern wf_table *y;
extern unsigned int jsd_comp_iter;
extern unsigned int jsd_total_comp;
extern jsd_entry **jsd_list;
/** mutexes for the analysis phase */
extern pthread_mutex_t analysis_mutex;
/** this mutex is just to synchronize the jsd_comp for easier reading of the debug prints */
extern pthread_mutex_t jsd_sync_mutex;
#endif