// ------------------------------------------------------------------------------------------------- void fjm_Start ( void ) // ------------------------------------------------------------------------------------------------- { LE_TEST_INFO("FJM TESTS START"); memset(TestResults, 0, sizeof(TestResults)); Counter = 0; // Compute the expected ending counter value. ExpectedCounterValue = GetExpectedCounterValue(); // Create semaphore to trigger CounterSemRef = le_sem_Create("CounterSem", 0); // Create the mutex. MutexRef = le_mutex_CreateNonRecursive("fork-join-mutex-test"); // Create the Context Pool. if (ContextPoolRef == NULL) { LE_TEST_INFO("Initializing FJM-ContextPool"); ContextPoolRef = le_mem_CreatePool("FJM-ContextPool", sizeof(Context_t)); le_mem_ExpandPool(ContextPoolRef, ExpectedCounterValue); } // Spawn the first child thread. SpawnChildren(1); }
// ------------------------------------------------------------------------------------------------- void fjm_Start ( void* completionObjPtr ///< [in] Pointer to the object whose reference count is used to signal /// the completion of the test. ) // ------------------------------------------------------------------------------------------------- { // Compute the expected ending counter value. ExpectedCounterValue = GetExpectedCounterValue(); // Create the mutex. MutexRef = le_mutex_CreateNonRecursive("fork-join-mutex-test"); LE_INFO("completionObjPtr = %p.", completionObjPtr); // Create the Context Pool. ContextPoolRef = le_mem_CreatePool("FJM-ContextPool", sizeof(Context_t)); le_mem_ExpandPool(ContextPoolRef, ExpectedCounterValue); // Spawn the first child thread. SpawnChildren(1, completionObjPtr); }