hsbench: fix flag handling

This commit is contained in:
Matthew Barr 2017-06-14 09:04:21 +10:00
parent 86e7acd4dd
commit 47ec449f85

View File

@ -205,7 +205,7 @@ static
void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets, void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
UNUSED unique_ptr<Grey> &grey) { UNUSED unique_ptr<Grey> &grey) {
const char options[] = "-b:c:Cd:e:E:G:hi:n:No:p:sVw:z:" const char options[] = "-b:c:Cd:e:E:G:hi:n:No:p:sVw:z:"
#if HAVE_DECL_PTHREAD_SETAFFINITY_N #ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
"T:" // add the thread flag "T:" // add the thread flag
#endif #endif
; ;
@ -287,6 +287,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
case 'V': case 'V':
scan_mode = ScanMode::VECTORED; scan_mode = ScanMode::VECTORED;
break; break;
#ifdef HAVE_DECL_PTHREAD_SETAFFINITY_NP
case 'T': case 'T':
if (!strToList(optarg, threadCores)) { if (!strToList(optarg, threadCores)) {
usage("Couldn't parse argument to -T flag, should be" usage("Couldn't parse argument to -T flag, should be"
@ -294,6 +295,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
exit(1); exit(1);
} }
break; break;
#endif
case 'z': { case 'z': {
unsigned int sinumber; unsigned int sinumber;
if (!fromString(optarg, sinumber)) { if (!fromString(optarg, sinumber)) {