jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.1KB

  1. #ifndef __jack_systemtest_h__
  2. #define __jack_systemtest_h__
  3. /**
  4. * GPL, yabbadabba
  5. *
  6. * Set of functions to gather system information for the jack setup wizard.
  7. *
  8. * @author Florian Faber, faber@faberman.de
  9. *
  10. * @version 0.1 (2009-01-15) [FF]
  11. * - initial version
  12. *
  13. **/
  14. /**
  15. * This function checks for the existence of known frequency scaling mechanisms
  16. * in this system.
  17. *
  18. * @returns 0 if the system has no frequency scaling capabilities non-0 otherwise.
  19. **/
  20. int system_has_frequencyscaling();
  21. /**
  22. * This function determines wether the CPU has a variable clock speed if frequency
  23. * scaling is available.
  24. *
  25. * @returns 0 if system doesn't use frequency scaling at the moment, non-0 otherwise
  26. **/
  27. int system_uses_frequencyscaling();
  28. /***
  29. * Checks for a definition in /etc/security/limits.conf that looks
  30. * as if it allows RT scheduling priority.
  31. *
  32. * @returns 1 if there appears to be such a line
  33. **/
  34. int system_has_rtprio_limits_conf();
  35. /**
  36. * Checks for the existence of the 'audio' group on this system
  37. *
  38. * @returns 0 is there is no 'audio' group, non-0 otherwise
  39. **/
  40. int system_has_audiogroup();
  41. /**
  42. * Tests wether the owner of this process is in the 'audio' group.
  43. *
  44. * @returns 0 if the owner of this process is not in the audio group, non-0 otherwise
  45. **/
  46. int system_user_in_audiogroup();
  47. /**
  48. * Determines wether the owner of this process can enable rt priority.
  49. *
  50. * @returns 0 if this process can not be switched to rt prio, non-0 otherwise
  51. **/
  52. int system_user_can_rtprio();
  53. long long unsigned int system_memlock_amount();
  54. /**
  55. * Checks wether the memlock limit is unlimited
  56. *
  57. * @returns 0 if the memlock limit is limited, non-0 otherwise
  58. **/
  59. int system_memlock_is_unlimited();
  60. long long unsigned int system_available_physical_mem();
  61. /**
  62. * Gets the version of the currently running kernel
  63. *
  64. * @returns String with the full version of the kernel
  65. **/
  66. char* system_kernel_version();
  67. /**
  68. * Returns the username. The caller is in charge of disposal of
  69. * the returned name.
  70. *
  71. * @returns Pointer to a username or NULL
  72. **/
  73. char* system_get_username();
  74. #endif /* __jack_systemtest_h__ */