aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog19
-rw-r--r--winsup/cygwin/autoload.cc9
-rw-r--r--winsup/cygwin/fhandler_proc.cc8
-rw-r--r--winsup/cygwin/fhandler_process.cc18
-rw-r--r--winsup/cygwin/ntdll.h18
-rw-r--r--winsup/cygwin/pinfo.cc2
6 files changed, 45 insertions, 29 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dbfb0d0..f525be6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,22 @@
+2002-05-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
+ Drop ZwQuerySystemInformation since NtQuerySystemInformation was
+ already available.
+ * fhandler_proc.cc (format_proc_uptime): Replace call to
+ ZwQuerySystemInformation by call to NtQuerySystemInformation.
+ (format_proc_stat): Ditto.
+ * fhandler_process.cc (format_process_stat): Replace call to
+ ZwQueryInformationProcess by call to NtQueryInformationProcess.
+ (get_process_state): Ditto.
+ (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
+ call to NtQueryVirtualMemory.
+ * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
+ NtQuerySystemInformation was already available. Replace declarations
+ of ZwXXX functions by declarations of NtXXX.
+ * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
+ by call to NtQuerySystemInformation.
+
2002-05-29 Christopher Faylor <cgf@redhat.com>
* include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index ed2f540..074a684 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -377,19 +377,18 @@ LoadDLLfunc (NetUserGetGroups, 28, netapi32)
LoadDLLfunc (NetUserGetInfo, 16, netapi32)
LoadDLLfunc (NetWkstaUserGetInfo, 12, netapi32)
-LoadDLLfuncEx (NtQueryInformationFile, 20, ntdll, 1)
-LoadDLLfuncEx2 (NtQueryObject, 20, ntdll, 1, 1)
LoadDLLfuncEx (NtCreateToken, 52, ntdll, 1)
LoadDLLfuncEx (NtMapViewOfSection, 40, ntdll, 1)
LoadDLLfuncEx (NtOpenFile, 24, ntdll, 1)
LoadDLLfuncEx (NtOpenSection, 12, ntdll, 1)
+LoadDLLfuncEx (NtQueryInformationFile, 20, ntdll, 1)
+LoadDLLfuncEx (NtQueryInformationProcess, 20, ntdll, 1)
+LoadDLLfuncEx2 (NtQueryObject, 20, ntdll, 1, 1)
LoadDLLfuncEx (NtQuerySystemInformation, 16, ntdll, 1)
+LoadDLLfuncEx (NtQueryVirtualMemory, 24, ntdll, 1)
LoadDLLfuncEx (NtUnmapViewOfSection, 8, ntdll, 1)
LoadDLLfuncEx (RtlInitUnicodeString, 8, ntdll, 1)
LoadDLLfuncEx (RtlNtStatusToDosError, 4, ntdll, 1)
-LoadDLLfuncEx (ZwQuerySystemInformation, 16, ntdll, 1)
-LoadDLLfuncEx (ZwQueryInformationProcess, 20, ntdll, 1)
-LoadDLLfuncEx (ZwQueryVirtualMemory, 24, ntdll, 1)
LoadDLLfuncEx (GetProcessMemoryInfo, 12, psapi, 1)
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index b0799a0..3a8990b 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -419,7 +419,7 @@ format_proc_uptime (char *destbuf, size_t maxsize)
unsigned long long uptime = 0ULL, idle_time = 0ULL;
SYSTEM_PROCESSOR_TIMES spt;
- NTSTATUS ret = ZwQuerySystemInformation (SystemProcessorTimes, (PVOID) &spt,
+ NTSTATUS ret = NtQuerySystemInformation (SystemProcessorTimes, (PVOID) &spt,
sizeof spt, NULL);
if (!ret && GetLastError () == ERROR_PROC_NOT_FOUND)
uptime = GetTickCount() / 10;
@@ -459,15 +459,15 @@ format_proc_stat (char *destbuf, size_t maxsize)
SYSTEM_PROCESSOR_TIMES spt;
SYSTEM_PERFORMANCE_INFORMATION spi;
SYSTEM_TIME_OF_DAY_INFORMATION stodi;
- ret = ZwQuerySystemInformation (SystemProcessorTimes,
+ ret = NtQuerySystemInformation (SystemProcessorTimes,
(PVOID) &spt,
sizeof spt, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQuerySystemInformation (SystemPerformanceInformation,
+ ret = NtQuerySystemInformation (SystemPerformanceInformation,
(PVOID) &spi,
sizeof spi, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQuerySystemInformation (SystemTimeOfDayInformation,
+ ret = NtQuerySystemInformation (SystemTimeOfDayInformation,
(PVOID) &stodi,
sizeof stodi, NULL);
if (ret != STATUS_SUCCESS)
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index a7d968d..c71329e 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -418,22 +418,22 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
FALSE, p->dwProcessId);
if (hProcess != NULL)
{
- ret = ZwQueryInformationProcess (hProcess,
+ ret = NtQueryInformationProcess (hProcess,
ProcessVmCounters,
(PVOID) &vmc,
sizeof vmc, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQueryInformationProcess (hProcess,
+ ret = NtQueryInformationProcess (hProcess,
ProcessTimes,
(PVOID) &put,
sizeof put, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQueryInformationProcess (hProcess,
+ ret = NtQueryInformationProcess (hProcess,
ProcessBasicInformation,
(PVOID) &pbi,
sizeof pbi, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQueryInformationProcess (hProcess,
+ ret = NtQueryInformationProcess (hProcess,
ProcessQuotaLimits,
(PVOID) &ql,
sizeof ql, NULL);
@@ -448,11 +448,11 @@ format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
return 0;
}
if (ret == STATUS_SUCCESS)
- ret = ZwQuerySystemInformation (SystemTimeOfDayInformation,
+ ret = NtQuerySystemInformation (SystemTimeOfDayInformation,
(PVOID) &stodi,
sizeof stodi, NULL);
if (ret == STATUS_SUCCESS)
- ret = ZwQuerySystemInformation (SystemProcessorTimes,
+ ret = NtQuerySystemInformation (SystemProcessorTimes,
(PVOID) &spt,
sizeof spt, NULL);
if (ret != STATUS_SUCCESS)
@@ -629,7 +629,7 @@ get_process_state (DWORD dwProcessId)
PULONG p = new ULONG[n];
int state =' ';
while (STATUS_INFO_LENGTH_MISMATCH ==
- (ret = ZwQuerySystemInformation (SystemProcessesAndThreadsInformation,
+ (ret = NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
(PVOID) p,
n * sizeof *p, NULL)))
delete [] p, p = new ULONG[n *= 2];
@@ -705,7 +705,7 @@ get_mem_values(DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, u
error);
return false;
}
- while ((ret = ZwQueryVirtualMemory (hProcess, 0,
+ while ((ret = NtQueryVirtualMemory (hProcess, 0,
MemoryWorkingSetList,
(PVOID) p,
n * sizeof *p, &length)),
@@ -734,7 +734,7 @@ get_mem_values(DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, u
else
++*vmdata;
}
- ret = ZwQueryInformationProcess (hProcess,
+ ret = NtQueryInformationProcess (hProcess,
ProcessVmCounters,
(PVOID) &vmc,
sizeof vmc, NULL);
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index 55ac88b..f10d27d 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -376,19 +376,17 @@ extern "C"
NTSTATUS NTAPI NtOpenFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
PIO_STATUS_BLOCK, ULONG, ULONG);
NTSTATUS NTAPI NtOpenSection (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
+ NTSTATUS NTAPI NtQueryInformationFile (HANDLE, IO_STATUS_BLOCK *, VOID *,
+ DWORD, DWORD);
+ NTSTATUS NTAPI NtQueryInformationProcess (HANDLE, PROCESSINFOCLASS,
+ PVOID, ULONG, PULONG);
+ NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, VOID *,
+ ULONG, ULONG *);
NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS,
PVOID, ULONG, PULONG);
+ NTSTATUS NTAPI NtQueryVirtualMemory (HANDLE, PVOID, MEMORY_INFORMATION_CLASS,
+ PVOID, ULONG, PULONG);
NTSTATUS NTAPI NtUnmapViewOfSection (HANDLE, PVOID);
VOID NTAPI RtlInitUnicodeString (PUNICODE_STRING, PCWSTR);
ULONG NTAPI RtlNtStatusToDosError (NTSTATUS);
- NTSTATUS NTAPI ZwQuerySystemInformation (IN SYSTEM_INFORMATION_CLASS,
- IN OUT PVOID, IN ULONG,
- OUT PULONG);
- NTSTATUS NTAPI ZwQueryInformationProcess (IN HANDLE, IN PROCESSINFOCLASS,
- OUT PVOID, IN ULONG, OUT PULONG);
- NTSTATUS NTAPI ZwQueryVirtualMemory (IN HANDLE, IN PVOID, IN MEMORY_INFORMATION_CLASS,
- OUT PVOID, IN ULONG, OUT PULONG);
- NTSTATUS NTAPI NtQueryInformationFile (HANDLE, IO_STATUS_BLOCK *, VOID *,
- DWORD, DWORD);
- NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, VOID *, ULONG, ULONG *);
}
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 4eda090..2b96442 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -318,7 +318,7 @@ winpids::enumNT (bool winpid)
NTSTATUS res;
for (;;)
{
- res = ZwQuerySystemInformation (SystemProcessesAndThreadsInformation,
+ res = NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
procs, szprocs, NULL);
if (res == 0)
break;