how can i initialise the head with pthread_t tid ?
In my project I have the structure defined like this.
/* Defining a structure for storing thread_id ,flag */
/* & expression */
typedef struct data
enum BOOLEAN flag;
struct data *next;
there is a finction called initialise_thread in which i am creating new node and initialising the values like this.
if(head==NULL) /* Null means memory was not allocated */
Log_Error(fp,"Memory allocation failed ");
head->tid=0; /* here i want to initialise this tid value to be 0 */
The problem is that the c compiler is giving me the error
error 1527: Incompatible types in cast: Must cas
t from scalar to scalar or to void type.
how to solve this problem ?
In my project I am creating a thread and i am storing the new thread id into the linked list.