This commit is contained in:
Jay D Dee
2017-12-17 12:00:42 -05:00
parent 7a1389998b
commit 79164c24b5
7 changed files with 230 additions and 56 deletions

View File

@@ -204,7 +204,7 @@ static void affine_to_cpu_mask( int id, unsigned long long mask )
for ( uint8_t i = 0; i < ncpus; i++ )
{
// cpu mask
if( (ncpus > 64) || ( mask & (1UL << i) ) ) CPU_SET( i, &set );
if( (ncpus > 64) || ( mask & (1ULL << i) ) ) CPU_SET( i, &set );
}
if ( id == -1 )
{
@@ -1690,9 +1690,9 @@ static void *miner_thread( void *userdata )
{
if (opt_debug)
applog( LOG_DEBUG, "Binding thread %d to cpu %d (mask %x)",
thr_id, thr_id % num_cpus, ( 1 << (thr_id % num_cpus) ) );
thr_id, thr_id % num_cpus, ( 1ULL << (thr_id % num_cpus) ) );
affine_to_cpu_mask( thr_id, 1 << (thr_id % num_cpus) );
affine_to_cpu_mask( thr_id, 1ULL << (thr_id % num_cpus) );
}
else if (opt_affinity != -1)
{