]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_negotiation_threads.h
d4ba22586d025b293a21c5801c2394a496a09aa3
[frescor/fna.git] / src_frescan / frescan_negotiation_threads.h
1 /*!
2  * @file frescan_negotiation_threads.h
3  *
4  * @brief FRESCAN negotiation threads
5  *
6  * This module contains the acceptor threads and the master thread for local
7  * negotiations, with functions to create them.
8  *
9  * @version 0.01
10  *
11  * @date 2-Apr-2008
12  *
13  * @author Daniel Sangorrin <daniel.sangorrin@unican.es>
14  *
15  */
16
17 #ifndef _FRESCAN_NEGOTIATION_THREADS_H_
18 #define _FRESCAN_NEGOTIATION_THREADS_H_
19
20 #include "frescan.h"
21
22 /**
23  * frescan_master_neg_thread_create()
24  *
25  * This call creates the thread in charge of LOCAL negotiations at the
26  * MASTER node, so in the rest of nodes it doesnt have to be called at
27  * initialization. This thread will await in a local request queue for
28  * LOCAL negotiation requests from threads in the same CPU.
29  * In the case of SLAVE nodes, the negotiation requests are simply performed
30  * by sending an appropiate message to the MASTER node and then awaiting
31  * in a reply object until an acceptor thread signals it.
32  */
33
34 extern int frescan_master_neg_thread_create(frescan_network_t net);
35
36 /**
37  * frescan_acceptor_thread_create()
38  *
39  * This call is called in every node (including the MASTER node) conforming
40  * a set of threads, one at each node, that awaits negotiation messages
41  * from a receive endpoint and perform the corresponding operations.
42  */
43
44 extern int frescan_acceptor_thread_create(frescan_network_t net);
45
46 #endif // _FRESCAN_NEGOTIATION_THREADS_H_