File: threaddcls.h

package info (click to toggle)
garli 2.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,888 kB
  • sloc: cpp: 34,419; sh: 11,026; makefile: 103
file content (43 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (5)
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
#ifndef THREADDCLS_H
#define THREADDCLS_H

#include <pthread.h>

class MasterGamlConfig;
class Population;

struct transferred_data_t	{
	char *tree_strings;
	unsigned int ts_size;
	double *kappas;
	unsigned int k_size;
	double score;
	int tag;
};

struct thread_arg_t	{
	int nprocs;
	MasterGamlConfig *conf;
	Population *pop;
};

extern transferred_data_t *node_results;
extern pthread_mutex_t lock_pm;
extern pthread_mutex_t lock_pop;
extern pthread_cond_t cond_pm;
extern bool g_quit_time;
extern bool g_processing_message;

void *master_poller(void *varg);
void *thread_func2(void *varg);
void purge_results(transferred_data_t *r);
void copy_results(transferred_data_t *lhs, transferred_data_t rhs);
bool valid_results(transferred_data_t r);
void send_quit_messages(int);
int process_message(char *buf, int size, int who, int tag, thread_arg_t *targ);
void DoMasterSM(char *buf, int size, int who, int tag, thread_arg_t *targ);
void DoMasterAMR(char *buf, int size, int who, int tag, thread_arg_t *targ);

int DoMasterSW(char *buf, int size, int who, int tag, thread_arg_t *targ);

#endif