We have the following line of code:
printf("%d\n", toc->runlist.next);
printf("%d\n", toc->runlist.next);
These are the definitions:
typedef struct thread_overview_control{
int id[NR_UTHREADS];
list_t runlist;
int active_counter;
int main_thread;
int need_resched;
} thread_overview_control;
thread_overview_control* toc;
What I'm trying to do is implement user threads. For some reason the output of the above code at the point where our test run crushes is:
12345678 //some address
0 //NOW IT'S NULL?!?!?!
How can this happen?? All we do is read a variable. And the strange thing is, without printf's there are no crashes. What's going on?