getsysstats.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* getsysstats - Determine various system internal values, stub version.
  2. Copyright (C) 1996-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <https://www.gnu.org/licenses/>. */
  15. #include <errno.h>
  16. #include <sys/sysinfo.h>
  17. int
  18. __get_nprocs_conf (void)
  19. {
  20. /* We don't know how to determine the number. Simply return always 1. */
  21. return 1;
  22. }
  23. libc_hidden_def (__get_nprocs_conf)
  24. weak_alias (__get_nprocs_conf, get_nprocs_conf)
  25. link_warning (get_nprocs_conf, "warning: get_nprocs_conf will always return 1")
  26. int
  27. __get_nprocs (void)
  28. {
  29. /* We don't know how to determine the number. Simply return always 1. */
  30. return 1;
  31. }
  32. libc_hidden_def (__get_nprocs)
  33. weak_alias (__get_nprocs, get_nprocs)
  34. link_warning (get_nprocs, "warning: get_nprocs will always return 1")
  35. long int
  36. __get_phys_pages (void)
  37. {
  38. /* We have no general way to determine this value. */
  39. __set_errno (ENOSYS);
  40. return -1;
  41. }
  42. libc_hidden_def (__get_phys_pages)
  43. weak_alias (__get_phys_pages, get_phys_pages)
  44. stub_warning (get_phys_pages)
  45. long int
  46. __get_avphys_pages (void)
  47. {
  48. /* We have no general way to determine this value. */
  49. __set_errno (ENOSYS);
  50. return -1;
  51. }
  52. libc_hidden_def (__get_avphys_pages)
  53. weak_alias (__get_avphys_pages, get_avphys_pages)
  54. stub_warning (get_avphys_pages)