Alexandre Julliard : kernel32: Remove cpu.c.

Alexandre Julliard julliard at winehq.org
Tue May 26 17:17:07 CDT 2020


Module: wine
Branch: master
Commit: 1b653e020d4ac5bc0a356c643e2f573ae8a6977d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1b653e020d4ac5bc0a356c643e2f573ae8a6977d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May 26 14:39:36 2020 +0200

kernel32: Remove cpu.c.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/Makefile.in |  1 -
 dlls/kernel32/cpu.c       | 95 -----------------------------------------------
 dlls/kernel32/process.c   | 46 ++++++++++++++++++++---
 3 files changed, 41 insertions(+), 101 deletions(-)

diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in
index c32cb5e53f..38c5b55de7 100644
--- a/dlls/kernel32/Makefile.in
+++ b/dlls/kernel32/Makefile.in
@@ -10,7 +10,6 @@ C_SRCS = \
 	comm.c \
 	computername.c \
 	console.c \
-	cpu.c \
 	debugger.c \
 	editline.c \
 	environ.c \
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
deleted file mode 100644
index 63014ea1c9..0000000000
--- a/dlls/kernel32/cpu.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * What processor?
- *
- * Copyright 1995,1997 Morten Welinder
- * Copyright 1997-1998 Marcus Meissner
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "config.h"
-#include "wine/port.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include "ntstatus.h"
-#define WIN32_NO_STATUS
-#include "windef.h"
-#include "winbase.h"
-#include "winnt.h"
-#include "winternl.h"
-#include "psapi.h"
-#include "ddk/wdm.h"
-#include "wine/unicode.h"
-#include "kernel_private.h"
-#include "wine/debug.h"
-
-WINE_DEFAULT_DEBUG_CHANNEL(reg);
-
-/***********************************************************************
- *           GetActiveProcessorGroupCount (KERNEL32.@)
- */
-WORD WINAPI GetActiveProcessorGroupCount(void)
-{
-    FIXME("semi-stub, always returning 1\n");
-    return 1;
-}
-
-/***********************************************************************
- *           GetActiveProcessorCount (KERNEL32.@)
- */
-DWORD WINAPI GetActiveProcessorCount(WORD group)
-{
-    SYSTEM_INFO si;
-    DWORD cpus;
-
-    GetSystemInfo( &si );
-    cpus = si.dwNumberOfProcessors;
-
-    FIXME("semi-stub, returning %u\n", cpus);
-    return cpus;
-}
-
-/***********************************************************************
- *           GetMaximumProcessorCount (KERNEL32.@)
- */
-DWORD WINAPI GetMaximumProcessorCount(WORD group)
-{
-    SYSTEM_INFO si;
-    DWORD cpus;
-
-    GetSystemInfo( &si );
-    cpus = si.dwNumberOfProcessors;
-
-    FIXME("semi-stub, returning %u\n", cpus);
-    return cpus;
-}
-
-/***********************************************************************
- *           GetEnabledXStateFeatures (KERNEL32.@)
- */
-DWORD64 WINAPI GetEnabledXStateFeatures(void)
-{
-    FIXME("\n");
-    return 0;
-}
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 9adf25ab48..66fa4ad506 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -53,7 +53,6 @@
 #include "kernel_private.h"
 #include "psapi.h"
 #include "wine/exception.h"
-#include "wine/library.h"
 #include "wine/server.h"
 #include "wine/unicode.h"
 #include "wine/asm.h"
@@ -702,6 +701,46 @@ HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK
     return S_OK;
 }
 
+/***********************************************************************
+ *           GetActiveProcessorGroupCount (KERNEL32.@)
+ */
+WORD WINAPI GetActiveProcessorGroupCount(void)
+{
+    FIXME("semi-stub, always returning 1\n");
+    return 1;
+}
+
+/***********************************************************************
+ *           GetActiveProcessorCount (KERNEL32.@)
+ */
+DWORD WINAPI GetActiveProcessorCount(WORD group)
+{
+    DWORD cpus = system_info.NumberOfProcessors;
+
+    FIXME("semi-stub, returning %u\n", cpus);
+    return cpus;
+}
+
+/***********************************************************************
+ *           GetMaximumProcessorCount (KERNEL32.@)
+ */
+DWORD WINAPI GetMaximumProcessorCount(WORD group)
+{
+    DWORD cpus = system_info.NumberOfProcessors;
+
+    FIXME("semi-stub, returning %u\n", cpus);
+    return cpus;
+}
+
+/***********************************************************************
+ *           GetEnabledXStateFeatures (KERNEL32.@)
+ */
+DWORD64 WINAPI GetEnabledXStateFeatures(void)
+{
+    FIXME("\n");
+    return 0;
+}
+
 /**********************************************************************
  *           GetNumaNodeProcessorMask     (KERNEL32.@)
  */
@@ -737,12 +776,9 @@ BOOL WINAPI GetNumaAvailableMemoryNodeEx(USHORT node, PULONGLONG available_bytes
  */
 BOOL WINAPI GetNumaProcessorNode(UCHAR processor, PUCHAR node)
 {
-    SYSTEM_INFO si;
-
     TRACE("(%d, %p)\n", processor, node);
 
-    GetSystemInfo( &si );
-    if (processor < si.dwNumberOfProcessors)
+    if (processor < system_info.NumberOfProcessors)
     {
         *node = 0;
         return TRUE;




More information about the wine-cvs mailing list