Attachment 'gpu-klmirqd-liblitmus-rt-ecrts12.patch'
Download 1 From 46e1995ef071f61cd1e21e61857c7ce66cac2022 Mon Sep 17 00:00:00 2001
2 From: Glenn Elliott <gelliott@cs.unc.edu>
3 Date: Thu, 2 Jun 2011 16:12:13 -0400
4 Subject: [PATCH] LibLitmus2010 changes to support klitirqd and Nvidia GPUs. Changes mostly related to k-FMLP.
5
6 ---
7 include/litmus.h | 12 +++++++++++-
8 src/syscalls.c | 10 ++++++++++
9 2 files changed, 21 insertions(+), 1 deletions(-)
10
11 diff --git a/include/litmus.h b/include/litmus.h
12 index 52435d8..035d1c3 100644
13 --- a/include/litmus.h
14 +++ b/include/litmus.h
15 @@ -49,7 +49,8 @@ int sporadic_task_ns(
16 /* file descriptor attached shared objects support */
17 typedef enum {
18 FMLP_SEM = 0,
19 - SRP_SEM = 1,
20 + KFMLP_SEM = 1,
21 + SRP_SEM = 2,
22 } obj_type_t;
23
24 int od_openx(int fd, obj_type_t type, int obj_id, void* config);
25 @@ -64,6 +65,10 @@ static inline int od_open(int fd, obj_type_t type, int obj_id)
26 int litmus_lock(int od);
27 int litmus_unlock(int od);
28
29 +/* nvidia graphics cards */
30 +int register_nv_device(int nv_device_id);
31 +int unregister_nv_device(int nv_device_id);
32 +
33 /* job control*/
34 int get_job_no(unsigned int* job_no);
35 int wait_for_job_release(unsigned int job_no);
36 @@ -120,6 +125,11 @@ static inline int open_fmlp_sem(int fd, int name)
37 return od_open(fd, FMLP_SEM, name);
38 }
39
40 +static inline int open_kfmlp_sem(int fd, int name, void* arg)
41 +{
42 + return od_openx(fd, KFMLP_SEM, name, arg);
43 +}
44 +
45 static inline int open_srp_sem(int fd, int name)
46 {
47 return od_open(fd, SRP_SEM, name);
48 diff --git a/src/syscalls.c b/src/syscalls.c
49 index d800141..b0fee23 100644
50 --- a/src/syscalls.c
51 +++ b/src/syscalls.c
52 @@ -88,3 +88,13 @@ int null_call(cycles_t *timestamp)
53 {
54 return syscall(__NR_null_call, timestamp);
55 }
56 +
57 +int register_nv_device(int nv_device_id)
58 +{
59 + return syscall(__NR_register_nv_device, nv_device_id, 1);
60 +}
61 +
62 +int unregister_nv_device(int nv_device_id)
63 +{
64 + return syscall(__NR_register_nv_device, nv_device_id, 0);
65 +}
66 --
67 1.7.0.4
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.