이 코드는 다중 스레드와 함께 스도쿠를 검사합니다. 내가 실행 프로그램 컴파일 후 : 분할 오류 (덤프 코어)포인터 및 다중 스레드 예상 오류 'void * (*) (void *)'하지만 인수는 'pthread_t'유형입니다.
int main(){
char t0,t1,t2;
pthread_t row,col,sub1;
t0=pthread_create(&row,NULL,row,NULL); //eror iz here!
t1=pthread_create(&col,NULL,col,NULL);
t2=pthread_create(&sub1,NULL,sub,NULL);
pthread_join(row, NULL);
pthread_join(col, NULL);
pthread_join(sub1, NULL);
exit(EXIT_SUCCESS);
return 0;
}
및 오류 :
는su.c: In function ‘main’:
su.c:87:2: warning: passing argument 3 of ‘pthread_create’ makes pointer from integer without a cast [enabled by default]
In file included from su.c:4:0:
/usr/include/pthread.h:225:12: note: expected ‘void * (*)(void *)’ but argument is of type ‘pthread_t’
su.c:88:2: warning: passing argument 3 of ‘pthread_create’ makes pointer from integer without a cast [enabled by default]
In file included from su.c:4:0:
/usr/include/pthread.h:225:12: note: expected ‘void * (*)(void *)’ but argument is of type ‘pthread_t’
내 FUNC 0 인수를 줄 수 있습니다 : 무효 * 서브를(); 미안하지만, 내 영어가 좋지 않다