From: "Kaz Kylheku" <kaz@xxxxxxxxxxxxxxxxx>
From: "Lucas Prado Melo" <lucaspm@xxxxxxxxxxx>:if( pthread_mutex_init(&( pck.mutex), NULL) != 0 ) die("pthread_mutex_init");You forgot: pck.stck = NULL; /* create empty stack */
Pardon me, /* initialize stack to empty state using appropriate API. */ stackInit(&pck.stck); :)