diff --git a/include_core/unix/thrdsup.h b/include_core/unix/thrdsup.h index 7ec1bb57463..3f68ea04755 100644 --- a/include_core/unix/thrdsup.h +++ b/include_core/unix/thrdsup.h @@ -89,6 +89,10 @@ int linux_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, c intptr_t init_thread_library(void); intptr_t set_pthread_priority(pthread_t handle, omrthread_prio_t j9ThreadPriority); intptr_t set_pthread_name(pthread_t self, pthread_t thread, const char *name); +intptr_t sem_init_zos(j9sem_t s, int pShared, int initValue); +intptr_t sem_destroy_zos(j9sem_t s); +intptr_t sem_wait_zos(j9sem_t s); +intptr_t sem_post_zos(j9sem_t s); extern struct J9ThreadLibrary default_library; diff --git a/port/zos390/omrcel4ro31.h b/port/zos390/omrcel4ro31.h index 516f4153ffd..fe04f978387 100644 --- a/port/zos390/omrcel4ro31.h +++ b/port/zos390/omrcel4ro31.h @@ -124,7 +124,7 @@ omr_cel4ro31_call(OMR_CEL4RO31_infoBlock *infoBlock); * @return whether CEL4RO31 runtime support is available. */ BOOLEAN -omr_cel4ro31_isSupported(void); +omr_cel4ro31_is_supported(void); /** * A helper routine to return an error message associated with the CEL4RO31 return code. diff --git a/port/zos390/omrgetjobid.c b/port/zos390/omrgetjobid.c index c2a88925724..a2e08b498c8 100644 --- a/port/zos390/omrgetjobid.c +++ b/port/zos390/omrgetjobid.c @@ -23,6 +23,7 @@ #include #include "omrport.h" #include "omrgetjobid.h" +#include "omrportpriv.h" #define JOBID_STRING_LENGTH 9 diff --git a/port/zos390/omrgetjobname.c b/port/zos390/omrgetjobname.c index 5131f41df35..ce1f3b0b26c 100644 --- a/port/zos390/omrgetjobname.c +++ b/port/zos390/omrgetjobname.c @@ -48,6 +48,7 @@ void omrget_jobname(struct OMRPortLibrary *portLibrary, char *jobname, uintptr_t length) { char *tmp_jobname = (char *)__malloc31(J9_MAX_JOBNAME); + extern void _JOBNAME(char *); /* defined in omrjobname.s */ if (NULL != tmp_jobname) { char *ascname = NULL; diff --git a/port/zos390/omrgetsysname.c b/port/zos390/omrgetsysname.c index 8040d329177..a19ba427570 100644 --- a/port/zos390/omrgetsysname.c +++ b/port/zos390/omrgetsysname.c @@ -21,6 +21,7 @@ *******************************************************************************/ #include +#include #include #include "omrgetsysname.h" diff --git a/port/zos390/omrgetuserid.c b/port/zos390/omrgetuserid.c index e17bde4caf6..45908850b78 100644 --- a/port/zos390/omrgetuserid.c +++ b/port/zos390/omrgetuserid.c @@ -54,6 +54,7 @@ omrget_userid(char *userid, uintptr_t length) uintptr_t result = 0; userid[0] = '\0'; + extern void _USERID(char *); /* defined in omruserid.s */ if (NULL != tmp_userid) { char *ascname = NULL; diff --git a/port/zos390/omrintrospect.h b/port/zos390/omrintrospect.h index 6915cb916f7..60473f4d9a3 100644 --- a/port/zos390/omrintrospect.h +++ b/port/zos390/omrintrospect.h @@ -34,22 +34,25 @@ #include "omrintrospect_common.h" #include "omrutil.h" -#pragma linkage(getthent, OS_UPSTACK) #if defined(OMR_ENV_DATA64) +#pragma linkage(getthent, OS) #pragma map(getthent, "BPX4GTH") -#else +#else /* defined(OMR_ENV_DATA64) */ +#pragma linkage(getthent, OS_UPSTACK) #pragma map(getthent, "BPX1GTH") -#endif +#endif /* defined(OMR_ENV_DATA64) */ -#pragma linkage(pthread_quiesce, OS_UPSTACK) #if defined(OMR_ENV_DATA64) #pragma map(pthread_quiesce, "BPX4PTQ") -#else +#else /* defined(OMR_ENV_DATA64) */ +#pragma linkage(pthread_quiesce, OS_UPSTACK) #pragma map(pthread_quiesce, "BPX1PTQ") -#endif +#endif /* defined(OMR_ENV_DATA64) */ +#if !defined(OMR_ENV_DATA64) #pragma linkage(pthread_quiesce_and_get_np_X, OS_UPSTACK) #pragma map(pthread_quiesce_and_get_np_X, "BPX1PQG") +#endif /* !defined(OMR_ENV_DATA64) */ #ifdef MAX_NAME #undef MAX_NAME @@ -60,8 +63,11 @@ typedef __mcontext_t_ thread_context; - +#if defined(__open_xl__) +#pragma pack(push, 1) +#else /* defined(__open_xl__) */ #pragma pack(packed) +#endif /* defined(__open_xl__) */ /* Program routine entry area (XPLINK) */ typedef struct XPLINK_Routine_entry { @@ -633,6 +639,10 @@ struct tcb { #define QUIESCE_SRB 9 /* Quiesce threads type = SRBs @DGA */ /* Skip 10 and 11 due to collision with BPXZCONS Freeze/Unfreeze Fast */ +#if defined(__open_xl__) +#pragma pack(pop) +#else /* defined(__open_xl__) */ #pragma pack(reset) +#endif /* defined(__open_xl__) */ #endif diff --git a/port/zos390/omrosbacktrace_impl.c b/port/zos390/omrosbacktrace_impl.c index 82c89acd7c7..859d80e135b 100644 --- a/port/zos390/omrosbacktrace_impl.c +++ b/port/zos390/omrosbacktrace_impl.c @@ -27,6 +27,7 @@ */ #include "omrport.h" +#include "omrportpriv.h" #include "omrsignal_context.h" #include #include diff --git a/port/zos390/omrosdump.c b/port/zos390/omrosdump.c index 4f98a4fdf89..8325fa92c02 100644 --- a/port/zos390/omrosdump.c +++ b/port/zos390/omrosdump.c @@ -26,6 +26,7 @@ * @brief Dump formatting */ +#define _EXT #include #include @@ -37,7 +38,9 @@ #include #include #include +#include "omrgetjobname.h" #include "omrport.h" +#include "omrportpriv.h" #if defined(J9ZOS390) && !defined(OMR_EBCDIC) #include "atoe.h" #endif @@ -333,6 +336,8 @@ tdump(struct OMRPortLibrary *portLibrary, char *asciiLabel, char *ebcdicLabel, u char dsn[256]; } *dsnPattern31; + extern void _TDUMP(struct ioparms_t *ioparms, struct dsn_pattern_t *dsn_pattern); /* defined in omrgenerate_ieat_dump.s */ + /* _TDUMP subroutine expects 31 bit addresses */ ioParms31 = __malloc31(sizeof(*ioParms31)); if (ioParms31 == NULL) { diff --git a/port/zos390/omrsignal_context.c b/port/zos390/omrsignal_context.c index e38c3a0af4b..3f2d4eb42a9 100644 --- a/port/zos390/omrsignal_context.c +++ b/port/zos390/omrsignal_context.c @@ -22,6 +22,7 @@ #include "omrport.h" #include "omrportpriv.h" +#include #include #include "omrsignal_context.h" #include "omrceeocb.h" diff --git a/port/zos390/omrsignal_context.h b/port/zos390/omrsignal_context.h index f0a3545e010..13a8d1280e1 100644 --- a/port/zos390/omrsignal_context.h +++ b/port/zos390/omrsignal_context.h @@ -57,6 +57,7 @@ uint32_t infoForVR(struct OMRPortLibrary *portLibrary, OMRUnixSignalInfo *info, uint32_t infoForModule(struct OMRPortLibrary *portLibrary, struct OMRUnixSignalInfo *info, int32_t index, const char **name, void **value); uint32_t infoForControl(struct OMRPortLibrary *portLibrary, struct OMRUnixSignalInfo *info, int32_t index, const char **name, void **value); uint32_t infoForSignal(struct OMRPortLibrary *portLibrary, struct OMRUnixSignalInfo *info, int32_t index, const char **name, void **value); +void fillInJumpInfo(struct OMRPortLibrary *portLibrary, void *contextInfo, void *jumpInfo); void fillInUnixSignalInfo(struct OMRPortLibrary *portLibrary, void *contextInfo, struct OMRUnixSignalInfo *signalInfo); BOOLEAN checkIfResumableTrapsSupported(struct OMRPortLibrary *portLibrary); diff --git a/thread/unix/thrdsup.c b/thread/unix/thrdsup.c index c3c3ebecbbb..b87ee789d52 100644 --- a/thread/unix/thrdsup.c +++ b/thread/unix/thrdsup.c @@ -66,12 +66,10 @@ intptr_t init_thread_library(void); static intptr_t zos_init_yielding(void); #endif intptr_t sem_getvalue_zos(j9sem_t s); -intptr_t sem_init_zos(j9sem_t s, int pShared, int initValue); void call_omrthread_init(void); -intptr_t sem_destroy_zos(j9sem_t s); -intptr_t sem_wait_zos(j9sem_t s); intptr_t sem_trywait_zos(j9sem_t s); -intptr_t sem_post_zos(j9sem_t s); +int setenv(const char *, const char *, int) __THROW; +char *getenv(const char *) __THROW; #if defined (OMRZTPF) void ztpf_init_proc(void); diff --git a/util/omrutil/unix/zos/getstoragekey.c b/util/omrutil/unix/zos/getstoragekey.c index d330657ee38..5502b785ece 100644 --- a/util/omrutil/unix/zos/getstoragekey.c +++ b/util/omrutil/unix/zos/getstoragekey.c @@ -26,6 +26,7 @@ uintptr_t getStorageKey(void) { + extern uintptr_t _GETPSW(); /* defined in getpsw.s */ /* The storage key is returned in bits 8-11 of the PSW */ return ((_GETPSW() >> 20) & 0xF); }