Skip to content

Commit

Permalink
Disable thread affinity on apple
Browse files Browse the repository at this point in the history
  • Loading branch information
pevisscher committed Oct 11, 2016
1 parent 95b418a commit 325bed4
Show file tree
Hide file tree
Showing 31 changed files with 33 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bsp/include/bsp/barrier.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/barrierType.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/bsp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/bspAbort.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 2 additions & 9 deletions bsp/include/bsp/bspClass.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -317,14 +317,7 @@ class BSP
SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST );
#endif // _WIN32

#ifdef __GNUG__
/*sched_param sch;
int policy;
pthread_getschedparam(pthread_self(), &policy, &sch);
sch.sched_priority = sched_get_priority_max(SCHED_FIFO);
int shedErr = pthread_setschedparam(pthread_self(), SCHED_FIFO, &sch);
assert(shedErr == 0);
pthread_getschedparam(pthread_self(), &policy, &sch);*/
#if defined(__GNUC__) && !defined(__APPLE__)
int num_cores = std::thread::hardware_concurrency();
int core_id = ProcId() % num_cores;

Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/bspExt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/bspProf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions bsp/include/bsp/communicationQueues.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -71,7 +71,7 @@ namespace BSPInternal
mQueues.clear();
mQueues.resize( maxProcs );

for ( auto & queue : mQueues )
for ( auto &queue : mQueues )
{
queue.resize( maxProcs );
}
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/condVarBarrier.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/historyRecorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/historyRecorderType.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/mixedBarrier.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/processorData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/registerMapType.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/requestVector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/requests.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/spinLock.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/stackAllocator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/threadRegisterMap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/threadRegisterVector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bsp/include/bsp/voidRecorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/helper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testBarrier.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testClassic.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testContainer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testExtra.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testIterators.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testPrimitive.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/testPtrs.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015 Mick van Duijn, Koen Visscher and Paul Visscher
* Copyright (c) 2016 Mick van Duijn, Koen Visscher and Paul Visscher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 325bed4

Please sign in to comment.