blob: 1c6620b5b4362d77beb5bb1469d5f301e3cddb5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
$NetBSD: patch-ad,v 1.1 2003/06/07 10:42:27 jmmv Exp $
--- src/ec_illithid.c.orig 2002-09-06 10:57:31.000000000 +0200
+++ src/ec_illithid.c
@@ -87,8 +87,8 @@ int illithid_gwip;
int illithid_buffer = -1;
pthread_t decoder_pid;
-pthread_mutex_t decoder_mtx = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t decoder_cond = PTHREAD_COND_INITIALIZER;
+pthread_mutex_t decoder_mtx;
+pthread_cond_t decoder_cond;
// protos...
@@ -117,6 +117,11 @@ void * Illithid_Decoder(void *dummy)
DEBUG_MSG("Illithid_Decoder -- running");
+ pthread_mutex_init(&decoder_mtx, NULL);
+ pthread_cond_init(&decoder_cond, NULL);
+
+ pthread_mutex_lock(&decoder_mtx);
+
LOOP {
pthread_testcancel();
@@ -1110,6 +1115,9 @@ void Illithid_Reset_Conn(void *dummy)
hash_table[j] = 0;
}
+ pthread_mutex_lock(&decoder_mtx);
+ pthread_mutex_unlock(&decoder_mtx);
+
ECThread_destroy(decoder_pid);
Buffer_Flush(illithid_buffer);
|