Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Deigue
Copy link
Contributor

@Deigue Deigue commented Apr 25, 2024

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)

Comment on lines 472 to 477
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
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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;

Copy link
Contributor Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants