-// Copyright (C) 2006-2008 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2013 CEA/DEN, EDF R&D
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "basesTest.hxx"
#include <iostream>
_var+=2;
_s1.post();
_s2.post();
+ return 0;
}
void *BasesTest::th1_2(void *st)
_s2.wait();
_glob<< myName << _var;
_s2.post();
+ return 0;
}
void *BasesTest::th1_3(void *st)
char myName=*((char *) st);
_glob<< myName << _var++;
_s1.post();
+ return 0;
}
void *BasesTest::th2_1(void *)
_m.unlock();
Thread::sleep(100000);
}
+ return 0;
}
void *BasesTest::myFunc(void *n)
DEBTRACE("thread " << id << " frees " << i << " resources");
free_resources(id, i);
}
-}
+ return 0;
+ }
void BasesTest::get_resources(int id, int amount)
{
}
for (i=0; i<THREAD_NUM; i++)
- {
+ {
ths[i] = new Thread(myFunc, &id[i]);
CPPUNIT_ASSERT(count_resources() == BasesTest::MAX_RESOURCE);
}
void BasesTest::testDL()
{
- DynLibLoader *loader=new DynLibLoader(".libs/libYACSDLTest");
+ DynLibLoader *loader=new DynLibLoader("libYACSDLTest");
void *symb=loader->getHandleOnSymbolWithName("myYacsFct");
FctPt f=(FctPt) symb;
double res=f(1.7);