getsysstats.c 2.0 KB

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