pthreadでqsortを並列化するのは、やっぱりうまく行かない。joinなしにすると微妙に結果が並びきっていないので、たぶんタイミングの問題だろうと思って、メインスレッドで以下のようにsleep(1)としてみたら、これがきちんとソートされるではないか。 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <assert.h> #include <stdbool.h> #include "psort.h" int main (int argc, char *argv[]) { int size; partition p; /* if (argc < 1) exit(1); */ /* size = atoi(argv[1]); */ size = 10; int x[s