私の ThreadData 構造体:
typedef struct threadData {
pthread_t *ths;
} threadData;
*ths は の配列ですpthread_t
。
ここで、ths[1] に新しいスレッドを作成する次の関数をアクションとして使用するスレッドを作成します。
void *rootThread(threadData *d) {
pthread_t *b = (*d).ths;
pthread_create(*(b+1),NULL,someRandomFunction,NULL);
}
しかし、それはうまくいかないようです。
pthread_t 要素を適切に逆参照しているかどうかはわかりません。助けてください!
ありがとう、 :)。