Module Name:    src
Committed By:   thorpej
Date:           Tue Dec 25 21:26:31 UTC 2018

Modified Files:
        src/tests/rump/kernspace: threadpool.c

Log Message:
Include some non-critical-but-still-for-correctness lines of code
in the cancellation unit test.  (I could have sworn I actually typed
these lines, no really...)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/rump/kernspace/threadpool.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/rump/kernspace/threadpool.c
diff -u src/tests/rump/kernspace/threadpool.c:1.1 src/tests/rump/kernspace/threadpool.c:1.2
--- src/tests/rump/kernspace/threadpool.c:1.1	Mon Dec 24 21:42:05 2018
+++ src/tests/rump/kernspace/threadpool.c	Tue Dec 25 21:26:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: threadpool.c,v 1.1 2018/12/24 21:42:05 thorpej Exp $	*/
+/*	$NetBSD: threadpool.c,v 1.2 2018/12/25 21:26:31 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: threadpool.c,v 1.1 2018/12/24 21:42:05 thorpej Exp $");
+__RCSID("$NetBSD: threadpool.c,v 1.2 2018/12/25 21:26:31 thorpej Exp $");
 #endif /* !lint */
 
 #include <sys/param.h>
@@ -231,4 +231,9 @@ rumptest_threadpool_job_cancel(void)
 	/* Now wait for the job to finish. */
 	threadpool_cancel_job(pool, &data.job);
 	KASSERT(data.count == FINAL_COUNT);
+	mutex_exit(&data.mutex);
+
+	fini_test_job_data(&data);
+
+	threadpool_put(pool, PRI_NONE);
 }

Reply via email to