-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenMP] Implements __kmp_is_address_mapped for Solaris/Illumos. #82930
Conversation
It was already known that illumos was not building with the __kmp_set_stack_info() function due to the difference in non-portable POSIX thread functions implemented by Solaris vs illumos. From reading the man page I question whether you can mix Solaris threads and POSIX threads functions together. CC @rorth |
You can. See
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please state where you tested the patch. Illumos only, Solaris, which version?
I tried on an Illumos based distro (openinidiana), note that illumos supports |
444ec06
to
8407834
Compare
That looks better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a full review, just two comments.
openmp/runtime/src/z_Linux_util.cpp
Outdated
@@ -66,6 +66,12 @@ | |||
#include <sys/types.h> | |||
#include <sys/sysctl.h> | |||
#elif KMP_OS_SOLARIS | |||
#if defined(__LP64__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why restrict the code to __LP64__
? openmp
is 64-bit-only anyway.
openmp/runtime/src/z_Linux_util.cpp
Outdated
@@ -66,6 +66,12 @@ | |||
#include <sys/types.h> | |||
#include <sys/sysctl.h> | |||
#elif KMP_OS_SOLARIS | |||
#if defined(__LP64__) | |||
#define _STRUCTURED_PROC 1 | |||
#include <sys/procfs.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(GH is driving me nuts: lost part of my comments for the second time ;-()
Why do things this way? The documented way to access procfs
is to just include <procfs.h>
(which deals with _STRUCTURED_PROC
internally).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know procfs.h did all, handy.
So you're adding a third variant when a simple conditional to distinguish between Solaris and Illumos would do? And how will you handle some case where there's no common ground between the two? The Illumos community finally needs to deal with Issue #53919: @MaskRay asked me to file it two years ago when running into Illumos/Solaris differences wrt. |
Also fixing OpenMP build itself for this platform.
8407834
to
febb364
Compare
Unfortunately, it s the reality of OSS ; for now I m using an old api present in both proprietary and opensolaris descendants :) I realise now that even sanitizers use it too. |
Also fixing OpenMP build itself for this platform.