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

Check if cross-memory server runs as a reusable address space #145

Merged
merged 1 commit into from Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 27 additions & 4 deletions c/crossmemory.c
Expand Up @@ -4004,11 +4004,16 @@ static int verifySTEPLIB(CrossMemoryServer *srv) {
return RC_CMS_OK;
}

#define MAIN_WAIT_MILLIS 10000
#define START_COMMAND_HANDLING_DELAY_IN_SEC 5
#define STCBASE_SHUTDOWN_DELAY_IN_SEC 5
static bool isReusableASID(void) {

int cmsStartMainLoop(CrossMemoryServer *srv) {
const char ascbreus = 0x40;

ASCB *ascb = getASCB();

return ascb->ascbflg3 & ascbreus;
}

static int testEnvironment(void) {

int authStatus = testAuth();
if (authStatus != 0) {
Expand All @@ -4023,6 +4028,24 @@ int cmsStartMainLoop(CrossMemoryServer *srv) {
return RC_CMS_BAD_SERVER_KEY;
}

if (!isReusableASID()) {
zowelog(NULL, LOG_COMP_ID_CMS, ZOWE_LOG_WARNING, CMS_LOG_REUSASID_NO_MSG);
}

return RC_CMS_OK;
}

#define MAIN_WAIT_MILLIS 10000
#define START_COMMAND_HANDLING_DELAY_IN_SEC 5
#define STCBASE_SHUTDOWN_DELAY_IN_SEC 5

int cmsStartMainLoop(CrossMemoryServer *srv) {

int envStatus = testEnvironment();
if (envStatus != 0) {
return envStatus;
}

int rcvrPushRC = recoveryPush(
"cmsStartMainLoop",
RCVR_FLAG_RETRY | RCVR_FLAG_DELETE_ON_RETRY | RCVR_FLAG_PRODUCE_DUMP,
Expand Down
6 changes: 6 additions & 0 deletions h/crossmemory.h
Expand Up @@ -857,6 +857,12 @@ CrossMemoryServerName cmsMakeServerName(const char *nameNullTerm);
#define CMS_LOG_DEV_MODE_ON_MSG_TEXT "Development mode is enabled"
#define CMS_LOG_DEV_MODE_ON_MSG CMS_LOG_DEV_MODE_ON_MSG_ID" "CMS_LOG_DEV_MODE_ON_MSG_TEXT

#ifndef CMS_LOG_REUSASID_NO_MSG_ID
#define CMS_LOG_REUSASID_NO_MSG_ID CMS_MSG_PRFX"0248W"
#endif
#define CMS_LOG_REUSASID_NO_MSG_TEXT "Address space is not reusable, start with REUSASID=YES to prevent an ASID shortage"
#define CMS_LOG_REUSASID_NO_MSG CMS_LOG_REUSASID_NO_MSG_ID" "CMS_LOG_REUSASID_NO_MSG_TEXT

#endif /* H_CROSSMEMORY_H_ */


Expand Down