aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2011-03-31 12:13:01 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2011-03-31 12:40:49 -0400
commitdf57458e4d8d86eee647a11f00ef7b2913a7f4a5 (patch)
tree04d28ecbc954dfd962f7ec033660aba874d54561 /src
parent26094304c72ab8d2488412df990dd966c60c5a02 (diff)
Simplify Nvidia registration.wip-kernsthreads-nv
Cleaned up the interface to register nvidia devices. Removed reliance on use of pid since we always assumed pid was the calling thread (AKA 'current').
Diffstat (limited to 'src')
-rw-r--r--src/syscalls.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/syscalls.c b/src/syscalls.c
index b6f6c5c..b0fee23 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -89,7 +89,12 @@ int null_call(cycles_t *timestamp)
89 return syscall(__NR_null_call, timestamp); 89 return syscall(__NR_null_call, timestamp);
90} 90}
91 91
92int register_nv_device(pid_t pid, int nv_device_id) 92int register_nv_device(int nv_device_id)
93{ 93{
94 return syscall(__NR_register_nv_device, pid, nv_device_id); 94 return syscall(__NR_register_nv_device, nv_device_id, 1);
95}
96
97int unregister_nv_device(int nv_device_id)
98{
99 return syscall(__NR_register_nv_device, nv_device_id, 0);
95} 100}