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

Open XL attribute packed and misc fixes #19900

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion runtime/port/sysvipc/j9shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "portpriv.h"
#include "j9sharedhelper.h"
#include "j9shmem.h"
#include "omrutil.h"
#include "protect_helpers.h"
#include "j9SysvIPCWrappers.h"
#include "shchelp.h"
Expand Down Expand Up @@ -1726,7 +1727,7 @@ openSharedMemory (J9PortLibrary *portLibrary, intptr_t fd, const char *baseFile,
goto failDontUnlink;
}
} else {
#if defined(__GNUC__) || defined(AIXPPC)
#if (defined(__GNUC__) && !defined(J9ZOS390)) || defined(AIXPPC)
#if defined(OSX)
/*Use ._key for OSX*/
if (buf.shm_perm._key != controlinfo->common.ftok_key)
Expand Down
2 changes: 1 addition & 1 deletion runtime/port/sysvipc/j9shsem_deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ openSemaphore(struct J9PortLibrary *portLibrary, intptr_t fd, char *baseFile, j9
goto failDontUnlink;
}
} else {
#if defined(__GNUC__) || defined(AIXPPC) || defined(J9ZTPF)
#if (defined(__GNUC__) && !defined(J9ZOS390)) || defined(AIXPPC) || defined(J9ZTPF)
#if defined(OSX)
/*Use _key for OSX*/
if (buf.sem_perm._key != controlinfo->ftok_key)
Expand Down
35 changes: 35 additions & 0 deletions runtime/port/zos390/j9hypervisor_systemz.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright IBM Corp. and others 2024
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
* or the Apache License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the following
* Secondary Licenses when the conditions for such availability set
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
* General Public License, version 2 with the GNU Classpath
* Exception [1] and GNU General Public License, version 2 with the
* OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] https://openjdk.org/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
*******************************************************************************/

/**
* @file
* @ingroup Port
* @brief Hypervisor Detection helper functions common to z/VM & and PR/SM Hypervisor
*/

#ifndef J9HYPERVISOR_SYSTEMZ_H_
#define J9HYPERVISOR_SYSTEMZ_H_

intptr_t
systemz_startup(struct J9PortLibrary *portLibrary);

#endif
4 changes: 2 additions & 2 deletions runtime/port/zos390/j9sysinfo_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C" {
*/
extern int getstfle(int lastDoubleWord, uint64_t *bits);

typedef __packed struct J9LPDat {
typedef __attribute__((packed)) struct J9LPDat {
int32_t length; /**< 0:4 length of area */
uint8_t version; /**< 4:1 version */
uint8_t flags; /**< 5:1 flags */
Expand Down Expand Up @@ -76,7 +76,7 @@ typedef __packed struct J9LPDat {
uint8_t reserved2[8]; /* 96:8 reserved for future use */
} J9LPDat;

typedef __packed struct J9LPDatServiceTableEntry {
typedef __attribute__((packed)) struct J9LPDatServiceTableEntry {
int32_t serviceUncapped; /**< 0:4 basic-mode service units accumulated while the partition
* was uncapped
*/
Expand Down