잘돌아가던 프로그래을 조금 수정하기위해 백업본을 만들고..
수정을 했더니 이게갑자기
pthread_create에서 세그멘테이션을날리면서 죽네요..
[code:1]
#define MAX_PHIL 5;
int main(int argc, char* argv[]) {
...
pthread_t a_thread[MAX_PHIL];
if(!CreateThread(a_thread))
g_check=false;
...}
bool CreateThread(pthread_t *th)
{
int res;
for(int i=0; i<MAX_PHIL; i++)
{
res = pthread_create(&th[i], NULL, thread_function, NULL);