Commit c87f4c303fee1714baded595484e43e117c21dab

Con Kolivas 2013-05-26T09:04:24

Give the avalon get results thread name the device number as well.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/driver-avalon.c b/driver-avalon.c
index eb8e9ca..c1c95be 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -688,11 +688,13 @@ static void *avalon_get_results(void *userdata)
 	char readbuf[AVALON_READBUF_SIZE];
 	struct thr_info *thr = info->thr;
 	int fd = avalon->device_fd;
+	char threadname[24];
 	int offset = 0;
 
 	pthread_detach(pthread_self());
 
-	RenameThread("ava_getres");
+	snprintf(threadname, 24, "ava_getres/%d", avalon->device_id);
+	RenameThread(threadname);
 
 	while (42) {
 		struct timeval timeout;