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
Initial changes for Open XL z/os support #7320
base: master
Are you sure you want to change the base?
Conversation
thread/common/thrprof.c
Outdated
uintptr_t *tempHandle; | ||
tempHandle = (uintptr_t *)&(thread->handle.__[0]); | ||
#if defined(__GNUC__) | ||
tempHandle = (uintptr_t *)&(thread->handle.__); | ||
#else | ||
tempHandle = (uintptr_t *)&(thread->handle.__[0]); | ||
#endif |
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.
This should use the same pattern as in #7323.
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.
So I am seeing https://github.com/Deigue/omr/blob/4401fae20ac9db1255fafb68333e322297d43620/include_core/thrtypes.h#L57 , handle
is of type OSTHREAD
OSTHREAD tempHandle = thread->handle;
return (uint_ptr)* <cast> tempHandle
But what would the cast look like? Where can I find OSTHREAD
to see what exactly __ is pulling out and how to cast it properly? "handle" also seemed like too broad a search/grep for /usr/include
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.
Something like this is what I meant:
OSTHREAD tempHandle = thread->handle;
return (uintptr_t)*(unsigned long long *)&tempHandle;
For z/OS, OSTHREAD
is defined in include_core/unix/thrdsup.h
:
typedef pthread_t OSTHREAD;
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.
Thanks, confirmed it works and everything compiles, and changed accordingly.
Includes all the initial work done a while ago made in order to support compiling with Open XL in context of z/OS.
Includes all the initial work done a while ago made in order to support compiling with Open XL in context of z/OS.
(This is one part of the multiple changes added for supporting Open XL compilation on OMR)