Accepting request 135275 from Base:System

fix multithreading patch for sort(1) to respect OMP_NUM_THREADS again.
the other, "pending" request, #114813, was rejected by aj already (forwarded request 135267 from froh)

OBS-URL: https://build.opensuse.org/request/show/135275
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=81
This commit is contained in:
Stephan Kulow 2012-09-23 06:31:16 +00:00 committed by Git OBS Bridge
parent 76c7003fe9
commit bd100c7177
2 changed files with 15 additions and 7 deletions

View File

@ -1,15 +1,17 @@
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2012-04-16 13:17:12.342019601 +0200
+++ src/sort.c 2012-04-16 13:17:12.463016705 +0200
@@ -5288,8 +5288,8 @@ main (int argc, char **argv)
--- src/sort.c.orig
+++ src/sort.c
@@ -5288,7 +5288,11 @@ main (int argc, char **argv)
{
if (!nthreads)
{
- unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE);
- nthreads = MIN (np, DEFAULT_MAX_THREADS);
+ //unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE);
+ nthreads = 1; //MIN (np, DEFAULT_MAX_THREADS);
+ unsigned long int np;
+ if (getenv("OMP_NUM_THREADS"))
+ np = num_processors (NPROC_CURRENT_OVERRIDABLE);
+ else
+ np = 1;
nthreads = MIN (np, DEFAULT_MAX_THREADS);
}
/* Avoid integer overflow later. */

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 21 11:55:12 UTC 2012 - froh@suse.com
- fix coreutils-8.9-singlethreaded-sort.patch to
respect OMP_NUM_THREADS again.
-------------------------------------------------------------------
Tue Jun 19 12:37:47 CEST 2012 - pth@suse.de