Commit 1bb2cadfa6a319ac889d63af519df2ee858807ce

Kano 2013-05-23T21:11:16

thread shutdown is different on windows

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index 6ec095e..07cd7d0 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2819,8 +2819,13 @@ static void __kill_work(void)
 		if (thr && PTH(thr) != 0L)
 			pth = &thr->pth;
 		thr_info_cancel(thr);
+#ifndef WIN32
 		if (pth && *pth)
 			pthread_join(*pth, NULL);
+#else
+		if (pth && pth->p)
+			pthread_join(*pth, NULL);
+#endif
 	}
 
 	applog(LOG_DEBUG, "Killing off stage thread");