From 18a26fb38ff2422cb4839d76f5314bd09231c0e9 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Sun, 7 Feb 2010 13:59:21 +0100 Subject: 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. --- rtkit.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'rtkit.h') 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 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 -- cgit