Hi Guys
This is my first post on this forum. I am trying to get save some information to be used later on. I have two threads (program/processes) running at the same time. I need to get a variable A value to save in variable B which i can use in my second thread later on. for example
In Thread A
B = A;
In Thread B
something = B;
Both thread A and B are independent to each other. My problem is how to share this information between these two threads. I have tried to use global variable but it didn't work. I defined variable B as global in one of the threads and then redefine the same variable with "extern" keyword in one of the header files which is common to both threads. With some testing i could see the value assigned to B in thread A(by printf) but then in thread B when i do a printf on B variable it is printed as 0. Can u guys help me out in this. I appreciate your time and consideration in this regard.