summaryrefslogtreecommitdiffstats
path: root/chan_lcr.c
diff options
context:
space:
mode:
authorSuper User2008-04-29 10:00:44 +0200
committerSuper User2008-04-29 10:00:44 +0200
commitcd8dc297eb5d3a75f86bc71d6c110af3bbf829a9 (patch)
tree0af60c6902b5d121b1c0665548afaa3df66d4ea2 /chan_lcr.c
parentcreation and termination of thread (diff)
downloadlcr-cd8dc297eb5d3a75f86bc71d6c110af3bbf829a9.tar.gz
lcr-cd8dc297eb5d3a75f86bc71d6c110af3bbf829a9.tar.xz
lcr-cd8dc297eb5d3a75f86bc71d6c110af3bbf829a9.zip
locking work
modified: chan_lcr.c
Diffstat (limited to 'chan_lcr.c')
-rw-r--r--chan_lcr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/chan_lcr.c b/chan_lcr.c
index 579d6e7..0a38304 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -754,6 +754,8 @@ static void *chan_thread(void *arg)
{
int work;
+ pthread_mutex_lock(&chan_lock);
+
while(!quit)
{
work = 0;
@@ -777,6 +779,9 @@ static void *chan_thread(void *arg)
pthread_mutex_lock(&chan_lock);
}
}
+
+ pthread_mutex_unlock(&chan_lock);
+
return NULL;
}