Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void quicksort (quickarg qa) {
- pthread_t thread1, thread2;
- int pivot = qa.premier;
- int dernier = qa.dernier;
- int ret;
- if (qa.premier < qa.dernier) {
- pivot = quicksort_partitionner(qa.tab, qa.premier, qa.dernier, pivot);
- qa.dernier = pivot - 1;
- pthread_create (&thread1, NULL, (void *) &quicksort, (void *) &qa);
- qa.premier = pivot + 1;
- qa.dernier = dernier;
- pthread_create (&thread2, NULL, (void *) &quicksort, (void *) &qa);
- pthread_join(thread1, NULL);
- pthread_join(thread2, NULL);
- }
- }
Add Comment
Please, Sign In to add comment