Thread
:
liblocation signal with global variable problem
View Single Post
nnsahoo
2010-03-11 , 13:29
Posts: 3 | Thanked: 0 times | Joined on Jan 2010
#
1
hello
I am getting problem while using g_connect_signal to registering the liblocation signal "changed" and updating a global variable in the signal handler.I am using that global variable in other thread.I am not getting proper result by doing this .I have tried using pthread_mutex_lock().
Can I know the signal number for the signal "changed"
If so,I can use the sigprocmask() to make a block to the signal.Or any other solution for it to use global variable in signal handler and also access the variable outside of signal handler.
The problem I am getting is while the location searching is going on it will update the LocationGPSDevice variable.And at same time i m updating into global variable and use it in my application.So which is not working properly as signal will block it while updating the LocationGPSDevice variable.
Last edited by nnsahoo; 2010-03-11 at
15:34
.
Quote & Reply
|
nnsahoo
View Public Profile
Find all posts by nnsahoo