Conversation
|
Do all tests pass on OpenBSD? |
|
Yes they do. |
|
I'm thinking to add Lines 42 to 55 in 4296c35 |
b602268 to
348b011
Compare
|
Good idea. I updated the patch to account for this. Despite the point I don't think OpenBSD is a system to mine efficiently on :) |
Since OpenBSD 6.0 W^X is enforced. Added `RANDOMX_FLAG_SECURE` in tests and benchmarks. Updated comment. Excluded `cpu_set_t` since it is not defined on OpenBSD.
4347f72 to
5c0486b
Compare
| #elif defined(_WIN32) || defined(__CYGWIN__) | ||
| rc = SetThreadAffinityMask(reinterpret_cast<HANDLE>(thread), 1ULL << cpuid) == 0 ? -2 : 0; | ||
| #else | ||
| #elif !defined(__OpenBSD__) |
There was a problem hiding this comment.
What's wrong with this on OpenBSD?
There was a problem hiding this comment.
Nvm, I missed your comment.
There was a problem hiding this comment.
This should actually be rewritten for OpenBSD: https://man.openbsd.org/NetBSD-7.0.1/affinity.3
Struct name is cpuset_t there.
There was a problem hiding this comment.
I may be mistaken but you are referring to a man page of NetBSD.
I can't find either one of these in the OpenBSD sources: cpu_set_t, cpuset_t, CPU_ZERO, CPU_SET.
I think there is no thread affinity for OpenBSD: https://man.openbsd.org/pthreads.3
There was a problem hiding this comment.
Yes, you're right and it seems to be a design decision for OpenBSD.
|
@ston1th Edit: nvm, OpenBSD doesn't support it. |
Since OpenBSD 6.0 W^X is enforced.
Added
RANDOMX_FLAG_SECUREin tests and benchmarks.Excluded
cpu_set_tsince it is not defined on OpenBSD.