implemented double pointers in stop_oldest_thread
This commit is contained in:
parent
abb1805338
commit
2af91e5aea
@ -264,8 +264,8 @@ void *stop_oldest_thread(void *id)
|
|||||||
{
|
{
|
||||||
sleep(WHY2_COMMUNICATION_TIME); //yk wait
|
sleep(WHY2_COMMUNICATION_TIME); //yk wait
|
||||||
if (waiting_list.head == NULL) return NULL;
|
if (waiting_list.head == NULL) return NULL;
|
||||||
|
printf("A\n");
|
||||||
if (*(pthread_t*) waiting_list.head -> value == *(pthread_t*) id) //THREAD IS STILL ALIVE, I HOPE
|
if (**(pthread_t**) waiting_list.head -> value == *(pthread_t*) id) //THREAD IS STILL ALIVE, I HOPE
|
||||||
{
|
{
|
||||||
//KILL THE THREAD
|
//KILL THE THREAD
|
||||||
pthread_cancel(*(pthread_t*) id);
|
pthread_cancel(*(pthread_t*) id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user