OSDN Git Service

Throughout use wincap.allocation_granularity instead of getpagesize.
authorcorinna <corinna>
Thu, 22 Dec 2011 11:02:31 +0000 (11:02 +0000)
committercorinna <corinna>
Thu, 22 Dec 2011 11:02:31 +0000 (11:02 +0000)
commita688134882d51cf7bc714b63f4f26d2b88b51ed1
treea155a859dd0012b863f6383eb8618fe76901f34b
parent2eb4006a535c14263b9f78700d9b2fddcc323c27
Throughout use wincap.allocation_granularity instead of getpagesize.
Throughout use wincap.page_size instead of getsystempagesize.
Throughout use "status" as variable name to hold NTSTATUS values.
* fhandler_mem.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS.
Fix debug_printf output.  Rectify long statements.  Fix comment
formatting.
* fhandler_proc.cc: Ditto.
(format_proc_swaps): Drop useless test for ERROR_PROC_NOT_FOUND.
* fhandler_process.cc: Ditto as in fhandler_mem.cc.
(get_process_state): Rearrange allocation loop.  Use malloc/realloc.
(get_mem_values): Fix potential NULL pointer usage.  Drop unused
variable.
* pinfo.cc (winpids::enum_processes): Handle low memory gracefully.
* sec_auth.cc (get_priv_list): Drop local variable ret.
* shared.cc (memory_init): Drop outdated call to getpagesize.
* syscalls.cc (getsystempagesize): Remove.
* sysconf.cc: Check for NT_SUCCESS rather than for STATUS_SUCCESS.
(sysinfo): Constify sizeof_stodi.  Drop useless test for
ERROR_PROC_NOT_FOUND.
* thread.cc (pthread_getattr_np): Cast pointers to uintptr_t rather
than to int for pointer arithmetic.
* winsup.h (getsystempagesize): Drop declaration.
14 files changed:
winsup/cygwin/ChangeLog
winsup/cygwin/cygheap.cc
winsup/cygwin/external.cc
winsup/cygwin/fhandler_mem.cc
winsup/cygwin/fhandler_proc.cc
winsup/cygwin/fhandler_process.cc
winsup/cygwin/mmap.cc
winsup/cygwin/pinfo.cc
winsup/cygwin/sec_auth.cc
winsup/cygwin/shared.cc
winsup/cygwin/syscalls.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/thread.cc
winsup/cygwin/winsup.h