summaryrefslogtreecommitdiffstats
path: root/userspace/include/unit/unit.h
diff options
context:
space:
mode:
authorNicolas Benech <nbenech@nvidia.com>2018-09-25 14:37:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-27 17:04:17 -0400
commitc6eae929fd74f11ab13d469a38bffd4e8ba50fb5 (patch)
tree12525d29aa8934cba58c703e67bf1aa8928ccacd /userspace/include/unit/unit.h
parent442cb2b1db40ae23bbcfda0624c0546da186694c (diff)
gpu: nvgpu: posix: Multithreading for unit tests
Add a -j argument to enable running unit tests on several threads. Also adds signal handling to prevent a fatal error in one thread from killing the whole unit test framework. JIRA NVGPU-1043 Change-Id: I891a547640cd005a50ffa5c06367ed46c54de012 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1847740 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'userspace/include/unit/unit.h')
-rw-r--r--userspace/include/unit/unit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/userspace/include/unit/unit.h b/userspace/include/unit/unit.h
index 2f93bab5..442a73f1 100644
--- a/userspace/include/unit/unit.h
+++ b/userspace/include/unit/unit.h
@@ -23,6 +23,8 @@
23#ifndef __UNIT_UNIT_H__ 23#ifndef __UNIT_UNIT_H__
24#define __UNIT_UNIT_H__ 24#define __UNIT_UNIT_H__
25 25
26#include <pthread.h>
27
26struct gk20a; 28struct gk20a;
27 29
28struct unit_module; 30struct unit_module;
@@ -84,6 +86,8 @@ struct unit_module {
84 */ 86 */
85 void *lib_handle; 87 void *lib_handle;
86 struct unit_fw *fw; 88 struct unit_fw *fw;
89
90 pthread_t thread;
87}; 91};
88 92
89/* 93/*