1
diff --git a/rtkit-daemon.c b/rtkit-daemon.c
2
index 69b48e0..11852e6 100644
5
@@ -183,7 +183,7 @@ struct process {
14
@@ -193,10 +193,10 @@ struct user {
19
+ struct rtkit_user *next;
22
-static struct user *users = NULL;
23
+static struct rtkit_user *users = NULL;
24
static unsigned n_users = 0;
25
static unsigned n_total_processes = 0;
26
static unsigned n_total_threads = 0;
27
@@ -291,7 +291,7 @@ static void free_process(struct process *p) {
31
-static void free_user(struct user *u) {
32
+static void free_user(struct rtkit_user *u) {
35
while ((p = u->processes)) {
36
@@ -302,13 +302,13 @@ static void free_user(struct user *u) {
40
-static bool user_in_burst(struct user *u) {
41
+static bool user_in_burst(struct rtkit_user *u) {
42
time_t now = time(NULL);
44
return now < u->timestamp + actions_burst_sec;
47
-static bool verify_burst(struct user *u) {
48
+static bool verify_burst(struct rtkit_user *u) {
50
if (!user_in_burst(u)) {
51
/* Restart burst phase */
52
@@ -327,8 +327,8 @@ static bool verify_burst(struct user *u) {
56
-static int find_user(struct user **_u, uid_t uid) {
58
+static int find_user(struct rtkit_user **_u, uid_t uid) {
59
+ struct rtkit_user *u;
61
for (u = users; u; u = u->next)
63
@@ -341,7 +341,7 @@ static int find_user(struct user **_u, uid_t uid) {
67
- if (!(u = malloc(sizeof(struct user))))
68
+ if (!(u = malloc(sizeof(struct rtkit_user))))
72
@@ -357,7 +357,7 @@ static int find_user(struct user **_u, uid_t uid) {
76
-static int find_process(struct process** _p, struct user *u, pid_t pid, unsigned long long starttime) {
77
+static int find_process(struct process** _p, struct rtkit_user *u, pid_t pid, unsigned long long starttime) {
80
for (p = u->processes; p; p = p->next)
81
@@ -387,7 +387,7 @@ static int find_process(struct process** _p, struct user *u, pid_t pid, unsigned
85
-static int find_thread(struct thread** _t, struct user *u, struct process *p, pid_t pid, unsigned long long starttime) {
86
+static int find_thread(struct thread** _t, struct rtkit_user *u, struct process *p, pid_t pid, unsigned long long starttime) {
89
for (t = p->threads; t; t = t->next)
90
@@ -472,7 +472,7 @@ static bool thread_relevant(struct process *p, struct thread *t) {
94
-static void thread_gc(struct user *u, struct process *p) {
95
+static void thread_gc(struct rtkit_user *u, struct process *p) {
96
struct thread *t, *n, *l;
98
/* Cleanup dead theads of a specific user we don't need to keep track about anymore */
99
@@ -499,7 +499,7 @@ static void thread_gc(struct user *u, struct process *p) {
100
assert(!p->threads || u->n_threads);
103
-static void process_gc(struct user *u) {
104
+static void process_gc(struct rtkit_user *u) {
105
struct process *p, *n, *l;
107
/* Cleanup dead processes of a specific user we don't need to keep track about anymore */
108
@@ -528,7 +528,7 @@ static void process_gc(struct user *u) {
111
static void user_gc(void) {
112
- struct user *u, *n, *l;
113
+ struct rtkit_user *u, *n, *l;
115
/* Cleanup all users we don't need to keep track about anymore */
117
@@ -637,7 +637,7 @@ static int verify_process_rttime(struct process *p) {
118
return good ? 0 : -EPERM;
121
-static int verify_process_user(struct user *u, struct process *p) {
122
+static int verify_process_user(struct rtkit_user *u, struct process *p) {
126
@@ -726,7 +726,7 @@ static char* get_exe_name(pid_t pid, char *exe, size_t len) {
130
-static int process_set_realtime(struct user *u, struct process *p, struct thread *t, unsigned priority) {
131
+static int process_set_realtime(struct rtkit_user *u, struct process *p, struct thread *t, unsigned priority) {
133
struct sched_param param;
134
char user[64], exe[128];
135
@@ -796,7 +796,7 @@ finish:
139
-static int process_set_high_priority(struct user *u, struct process *p, struct thread *t, int priority) {
140
+static int process_set_high_priority(struct rtkit_user *u, struct process *p, struct thread *t, int priority) {
142
struct sched_param param;
143
char user[64], exe[128];
144
@@ -861,7 +861,7 @@ finish:
147
static void reset_known(void) {
149
+ struct rtkit_user *u;
153
@@ -1024,7 +1024,7 @@ finish:
156
static int lookup_client(
158
+ struct rtkit_user **_u,
162
@@ -1035,7 +1035,7 @@ static int lookup_client(
164
unsigned long pid, uid;
165
unsigned long long starttime;
167
+ struct rtkit_user *u;
171
@@ -1115,7 +1115,7 @@ static int translate_error_backwards(const char *name) {
175
-static int verify_polkit(DBusConnection *c, struct user *u, struct process *p, const char *action) {
176
+static int verify_polkit(DBusConnection *c, struct rtkit_user *u, struct process *p, const char *action) {
178
DBusMessage *m = NULL, *r = NULL;
179
const char *unix_process = "unix-process";
180
@@ -1236,7 +1236,7 @@ static DBusHandlerResult dbus_handler(DBusConnection *c, DBusMessage *m, void *u
185
+ struct rtkit_user *u;
189
@@ -1278,7 +1278,7 @@ static DBusHandlerResult dbus_handler(DBusConnection *c, DBusMessage *m, void *u
194
+ struct rtkit_user *u;
198
@@ -2147,7 +2147,7 @@ static int parse_command_line(int argc, char *argv[], int *ret) {
199
int main(int argc, char *argv[]) {
200
DBusConnection *bus = NULL;
203
+ struct rtkit_user *u;
205
if (parse_command_line(argc, argv, &ret) <= 0)