]> rtime.felk.cvut.cz Git - orte.git/blob - orte/liborte/ORTEDomainMgr.c
d42ebc225af08fc2025ac88f6d9f538356473754
[orte.git] / orte / liborte / ORTEDomainMgr.c
1 /*
2  *  $Id: ORTEDomainMgr.c,v 0.0.0.1      2003/09/12
3  *
4  *  DEBUG:  section 29                  Domain manager
5  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
6  *
7  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
8  *  --------------------------------------------------------------------
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *  
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *  
20  */ 
21
22 #include "orte_all.h"
23
24 /*****************************************************************************/
25 ORTEDomain *
26 ORTEDomainMgrCreate(int domain, ORTEDomainProp *prop,
27                     ORTEDomainAppEvents *events,Boolean suspended) {
28   ORTEDomain        *d;
29
30   debug(29,10) ("ORTEDomainMgrCreate: start\n");
31
32   d=ORTEDomainCreate(domain,prop,events,ORTE_TRUE);
33   if (!d)
34     return NULL;
35   
36   //Start threads
37   if (!suspended) {
38     ORTEDomainStart(d,                                  /* domain */
39                     ORTE_TRUE,                          /* recvUnicastMetarafficThread */
40                     ORTE_FALSE,                         /* recvMulticastMetarafficThread */
41                     ORTE_FALSE,                         /* recvUnicastUserdataThread */
42                     ORTE_FALSE,                         /* recvMulticastUserdataThread */
43                     ORTE_TRUE);                         /* sendThread */
44   }
45
46   debug(29,10) ("ORTEDomainMgrCreate: finished\n");
47   return d;
48 }
49
50 /*****************************************************************************/
51 Boolean
52 ORTEDomainMgrDestroy(ORTEDomain *d) {
53   Boolean ret;
54
55   debug(29,10) ("ORTEDomainMgrDestroy: start\n");
56
57   ret=ORTEDomainDestroy(d,ORTE_TRUE);
58
59   debug(29,10) ("ORTEDomainMgrDestroy: finished\n");
60   return ret;
61 }