summaryrefslogtreecommitdiffstats
path: root/rtkit.h
diff options
context:
space:
mode:
authorDavid Henningsson <launchpad.web@epost.diwic.se>2010-02-07 13:59:21 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-17 02:51:43 +0100
commit18a26fb38ff2422cb4839d76f5314bd09231c0e9 (patch)
tree185ffc96f653a9385a55753d426b246ae6ad1c5d /rtkit.h
parentd30db4ca250a2743872a525740d5177705072fda (diff)
rtkit: Add client-side testing of properties
To complete the previous patch that implemented properties in rtkit, here's the client-side code that tests that the properties work, and make them more accessible for the casual C programmer.
Diffstat (limited to 'rtkit.h')
-rw-r--r--rtkit.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/rtkit.h b/rtkit.h
index 2081b4e..2b5b2c2 100644
--- a/rtkit.h
+++ b/rtkit.h
@@ -5,6 +5,7 @@
/***
Copyright 2009 Lennart Poettering
+ Copyright 2010 David Henningsson <diwic@ubuntu.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
@@ -55,6 +56,22 @@ int rtkit_make_realtime(DBusConnection *system_bus, pid_t thread, int priority);
* on success.*/
int rtkit_make_high_priority(DBusConnection *system_bus, pid_t thread, int nice_level);
+/* Return the maximum value of realtime priority available. Realtime requests
+ * above this value will fail. A negative value is an errno style error code.
+ */
+int rtkit_get_max_realtime_priority(DBusConnection *system_bus);
+
+/* Retreive the minimum value of nice level available. High prio requests
+ * below this value will fail. The returned value is a negative errno
+ * style error code, or 0 on success.*/
+int rtkit_get_min_nice_level(DBusConnection *system_bus, int* min_nice_level);
+
+/* Return the maximum value of RLIMIT_RTTIME to set before attempting a
+ * realtime request. A negative value is an errno style error code.
+ */
+long long rtkit_get_rttime_nsec_max(DBusConnection *system_bus);
+
+
#ifdef __cplusplus
}
#endif