Merge pull request #136 from alexander-zimmermann/next

Fix bug & 2 warnings on OS X
Merge pull request #137 from alexander-zimmermann/next

CPU affinity implementaion for OS X
[Coding style] do not use leading underscore for names
Merge remote-tracking branch 'upstream/next' into next