This commit is contained in:
Jay D Dee
2019-05-21 20:55:05 -04:00
parent e1aead3c76
commit eb3f57bfc7
4 changed files with 30 additions and 12 deletions

View File

@@ -159,6 +159,10 @@ Support for even older x86_64 without AES_NI or SSE2 is not availble.
Change Log Change Log
---------- ----------
v3.9.0.1
Isolate Windows CPU groups code when CPU groups support not explicitly defined.
v3.9.0 v3.9.0
Added support for Windows CPU groups. Added support for Windows CPU groups.

20
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.9.0. # Generated by GNU Autoconf 2.69 for cpuminer-opt 3.9.0.1.
# #
# #
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='cpuminer-opt' PACKAGE_NAME='cpuminer-opt'
PACKAGE_TARNAME='cpuminer-opt' PACKAGE_TARNAME='cpuminer-opt'
PACKAGE_VERSION='3.9.0' PACKAGE_VERSION='3.9.0.1'
PACKAGE_STRING='cpuminer-opt 3.9.0' PACKAGE_STRING='cpuminer-opt 3.9.0.1'
PACKAGE_BUGREPORT='' PACKAGE_BUGREPORT=''
PACKAGE_URL='' PACKAGE_URL=''
@@ -1332,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures cpuminer-opt 3.9.0 to adapt to many kinds of systems. \`configure' configures cpuminer-opt 3.9.0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1404,7 +1404,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of cpuminer-opt 3.9.0:";; short | recursive ) echo "Configuration of cpuminer-opt 3.9.0.1:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -1509,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
cpuminer-opt configure 3.9.0 cpuminer-opt configure 3.9.0.1
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by cpuminer-opt $as_me 3.9.0, which was It was created by cpuminer-opt $as_me 3.9.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@@ -2993,7 +2993,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='cpuminer-opt' PACKAGE='cpuminer-opt'
VERSION='3.9.0' VERSION='3.9.0.1'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@@ -6690,7 +6690,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by cpuminer-opt $as_me 3.9.0, which was This file was extended by cpuminer-opt $as_me 3.9.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -6756,7 +6756,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
cpuminer-opt config.status 3.9.0 cpuminer-opt config.status 3.9.0.1
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@@ -1,4 +1,4 @@
AC_INIT([cpuminer-opt], [3.9.0]) AC_INIT([cpuminer-opt], [3.9.0.1])
AC_PREREQ([2.59c]) AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM

View File

@@ -246,6 +246,9 @@ static void affine_to_cpu_mask( int id, unsigned long mask )
if ( id == -1 ) if ( id == -1 )
success = SetProcessAffinityMask( GetCurrentProcess(), mask ); success = SetProcessAffinityMask( GetCurrentProcess(), mask );
// Are Windows CPU Groups supported?
#if _WIN32_WINNT==0x0601
else if ( num_cpugroups == 1 ) else if ( num_cpugroups == 1 )
success = SetThreadAffinityMask( GetCurrentThread(), mask ); success = SetThreadAffinityMask( GetCurrentThread(), mask );
else else
@@ -270,6 +273,10 @@ static void affine_to_cpu_mask( int id, unsigned long mask )
affinity.Mask = 1ULL << cpu; affinity.Mask = 1ULL << cpu;
success = SetThreadGroupAffinity( GetCurrentThread(), &affinity, NULL ); success = SetThreadGroupAffinity( GetCurrentThread(), &affinity, NULL );
} }
#else
else
success = SetThreadAffinityMask( GetCurrentThread(), mask );
#endif
if (!success) if (!success)
{ {
@@ -3223,9 +3230,11 @@ int main(int argc, char *argv[])
// num_cpus = sysinfo.dwNumberOfProcessors; // num_cpus = sysinfo.dwNumberOfProcessors;
// What happens if GetActiveProcessorGroupCount called if groups not enabled? // What happens if GetActiveProcessorGroupCount called if groups not enabled?
// Are Windows CPU Groups supported?
#if _WIN32_WINNT==0x0601
num_cpus = 0; num_cpus = 0;
num_cpugroups = GetActiveProcessorGroupCount(); num_cpugroups = GetActiveProcessorGroupCount();
for(i = 0; i < num_cpugroups; i++) for( i = 0; i < num_cpugroups; i++ )
{ {
int cpus = GetActiveProcessorCount(i); int cpus = GetActiveProcessorCount(i);
num_cpus += cpus; num_cpus += cpus;
@@ -3233,6 +3242,11 @@ int main(int argc, char *argv[])
if (opt_debug) if (opt_debug)
applog(LOG_DEBUG, "Found %d cpus on cpu group %d", cpus, i); applog(LOG_DEBUG, "Found %d cpus on cpu group %d", cpus, i);
} }
#else
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
num_cpus = sysinfo.dwNumberOfProcessors;
#endif
#elif defined(_SC_NPROCESSORS_CONF) #elif defined(_SC_NPROCESSORS_CONF)
num_cpus = sysconf(_SC_NPROCESSORS_CONF); num_cpus = sysconf(_SC_NPROCESSORS_CONF);