+2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #18822]
+ * include/sys/sysinfo.h (__get_nprocs_conf): Add
+ libc_hidden_proto.
+ (__get_nprocs): Likewise.
+ (__get_phys_pages): Likewise.
+ (__get_avphys_pages): Likewise.
+ (__get_child_max): Add attribute_hidden.
+ * misc/getsysstats.c (__get_nprocs_conf): Add libc_hidden_def.
+ (__get_nprocs): Likewise.
+ (__get_phys_pages): Likewise.
+ (__get_avphys_pages): Likewise.
+ * sysdeps/mach/getsysstats.c (__get_nprocs_conf): Add
+ libc_hidden_def.
+ (__get_nprocs): Likewise.
+ (__get_phys_pages): Likewise.
+ (__get_avphys_pages): Likewise.
+ * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Add
+ libc_hidden_def.
+ (__get_nprocs_conf): Likewise.
+ (__get_phys_pages): Likewise.
+ (__get_avphys_pages): Likewise.
+
2017-10-01 H.J. Lu <hongjiu.lu@intel.com>
[BZ #18822]
/* Return number of configured processors. */
extern int __get_nprocs_conf (void);
+libc_hidden_proto (__get_nprocs_conf)
/* Return number of available processors. */
extern int __get_nprocs (void);
+libc_hidden_proto (__get_nprocs)
/* Return number of physical pages of memory in the system. */
extern long int __get_phys_pages (void);
+libc_hidden_proto (__get_phys_pages)
/* Return number of available physical pages of memory in the system. */
extern long int __get_avphys_pages (void);
+libc_hidden_proto (__get_avphys_pages)
/* Return maximum number of processes this real user ID can have. */
-extern long int __get_child_max (void);
+extern long int __get_child_max (void) attribute_hidden;
# endif /* !_ISOMAC */
#endif /* sys/sysinfo.h */
/* We don't know how to determine the number. Simply return always 1. */
return 1;
}
+libc_hidden_def (__get_nprocs_conf)
weak_alias (__get_nprocs_conf, get_nprocs_conf)
link_warning (get_nprocs_conf, "warning: get_nprocs_conf will always return 1")
/* We don't know how to determine the number. Simply return always 1. */
return 1;
}
+libc_hidden_def (__get_nprocs)
weak_alias (__get_nprocs, get_nprocs)
link_warning (get_nprocs, "warning: get_nprocs will always return 1")
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__get_phys_pages)
weak_alias (__get_phys_pages, get_phys_pages)
stub_warning (get_phys_pages)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__get_avphys_pages)
weak_alias (__get_avphys_pages, get_avphys_pages)
stub_warning (get_avphys_pages)
return hbi.max_cpus;
}
+libc_hidden_def (__get_nprocs_conf)
weak_alias (__get_nprocs_conf, get_nprocs_conf)
/* Return the number of processors currently available on the system. */
return hbi.avail_cpus;
}
+libc_hidden_def (__get_nprocs)
weak_alias (__get_nprocs, get_nprocs)
/* Return the number of physical pages on the system. */
return hbi.memory_size / __vm_page_size;
}
+libc_hidden_def (__get_phys_pages)
weak_alias (__get_phys_pages, get_phys_pages)
/* Return the number of available physical pages */
return vs.free_count;
}
+libc_hidden_def (__get_avphys_pages)
weak_alias (__get_avphys_pages, get_avphys_pages)
return result;
}
+libc_hidden_def (__get_nprocs)
weak_alias (__get_nprocs, get_nprocs)
return result;
}
+libc_hidden_def (__get_nprocs_conf)
weak_alias (__get_nprocs_conf, get_nprocs_conf)
__sysinfo (&info);
return sysinfo_mempages (info.totalram, info.mem_unit);
}
+libc_hidden_def (__get_phys_pages)
weak_alias (__get_phys_pages, get_phys_pages)
long int
__sysinfo (&info);
return sysinfo_mempages (info.freeram, info.mem_unit);
}
+libc_hidden_def (__get_avphys_pages)
weak_alias (__get_avphys_pages, get_avphys_pages)