Home | History | Annotate | Download | only in adb

Lines Matching refs:threads

1442  * waiting threads as there are chunks. Then each thread would wait on a chunk of
1453 * accross all the waiting threads, so each waiting thread knows when any
1458 * the original array. This pointer is shared accross all the waiting threads
1460 * waiting threads exit, the value contained here would indicate the first
1484 * sibling threads is exiting. */
1515 WaitForAllParam* threads;
1519 /* This variable is going to be accessed by several threads at the same time,
1534 threads = (WaitForAllParam*)malloc((chunks + (remains ? 1 : 0)) *
1536 if (threads == NULL) {
1541 /* Create main event to wait on for all waiting threads. This is a "manualy
1546 free(threads);
1555 threads[chunk].main_event = main_event;
1556 threads[chunk].signaled_index = &sig_index;
1557 threads[chunk].first_handle_index = WAIT_ALL_CHUNK_SIZE * chunk;
1558 threads[chunk].handles = handles + threads[chunk].first_handle_index;
1559 threads[chunk].handles_count = WAIT_ALL_CHUNK_SIZE;
1562 threads[chunk].main_event = main_event;
1563 threads[chunk].signaled_index = &sig_index;
1564 threads[chunk].first_handle_index = WAIT_ALL_CHUNK_SIZE * chunk;
1565 threads[chunk].handles = handles + threads[chunk].first_handle_index;
1566 threads[chunk].handles_count = remains;
1570 /* Start the waiting threads. */
1574 threads[chunk].thread = (HANDLE)_beginthreadex(NULL, 0, _in_waiter_thread,
1575 &threads[chunk], 0, NULL);
1576 if (threads[chunk].thread == NULL) {
1586 /* Wait on any of the threads to get signaled. */
1589 /* Wait on all the waiting threads to exit. */
1591 WaitForSingleObject(threads[chunk].thread, INFINITE);
1592 CloseHandle(threads[chunk].thread);
1596 free(threads);