Advertisement
Guest User

Untitled

a guest
May 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. //ross.c: In function ‘Pop_Task’:
  2. //ross.c:96: error: incompatible types when assigning to type ‘struct Task *’ from type ‘Task’
  3.  
  4. typedef struct Task {
  5.   int task_number;
  6.   Playfield *pf;
  7.   Move *moves;
  8.   int sx;
  9.   int sy;
  10.   int depth;
  11. } Task;
  12.  
  13. Task *Pop_Task() {
  14.   Task *task;
  15.  
  16.   pthread_mutex_lock(&stack_mutex);
  17.   if(task_stack.pointer < 0) {
  18.     pthread_mutex_unlock(&stack_mutex);
  19.     return NULL;
  20.   }  
  21.   task = task_stack.tasks[task_stack.pointer];
  22.   task_stack.pointer--;
  23.   pthread_mutex_unlock(&stack_mutex);
  24.  
  25.   return task;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement