Skip to content

Commit

Permalink
Merge pull request #338 from zowe/v2.x/staging
Browse files Browse the repository at this point in the history
Merge staging into rc
  • Loading branch information
1000TurquoisePogs authored Oct 5, 2022
2 parents 43935f4 + cb86188 commit caacd0c
Show file tree
Hide file tree
Showing 32 changed files with 1,141 additions and 94 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-rexxconfigmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
id: branch
run: echo "::set-output name=branch::$(if [ -n '${{ github.head_ref }}' ]; then echo '${{ github.head_ref }}' | tr '[:lower:]' '[:upper:]'; else echo '${{ github.ref_name }}' | tr '[:lower:]' '[:upper:]'; fi | sed 's@/@-@g')"


- name: '[Prep 6] Prepare workflow'
uses: zowe-actions/shared-actions/prepare-workflow@main

Expand Down
24 changes: 12 additions & 12 deletions c/configmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,8 @@ static Json *varargsDereference(Json *json, int argCount, va_list args, int *err
}
int arraySize = jsonArrayGetCount(array);
if (index >= arraySize){
*errorReason = JSON_POINTER_ARRAY_INDEX_OUT_OF_BOUNDS;
return NULL;
*errorReason = JSON_POINTER_ARRAY_INDEX_OUT_OF_BOUNDS;
return NULL;
}
value = jsonArrayGetItem(array,index);
} else if (jsonIsObject(value)){
Expand All @@ -961,19 +961,19 @@ static Json *varargsDereference(Json *json, int argCount, va_list args, int *err
}
Json *newValue = jsonObjectGetPropertyValue(object,key);
if (newValue == NULL){
if (traceLevel >= 2){
jsonObjectGetPropertyValueLoud(object,key);
jsonPrinter *p = makeJsonPrinter(stdoutFD());
jsonEnablePrettyPrint(p);
jsonPrint(p,value);
printf("\n");
jsonDumpObj(object);
fflush(stdout);
}
if (traceLevel >= 2){
jsonObjectGetPropertyValueLoud(object,key);
jsonPrinter *p = makeJsonPrinter(stdoutFD());
jsonEnablePrettyPrint(p);
jsonPrint(p,value);
printf("\n");
jsonDumpObj(object);
fflush(stdout);
}
*errorReason = JSON_POINTER_TOO_DEEP;
return NULL;
} else{
value = newValue;
value = newValue;
}
} else {
if (traceLevel >= 1){
Expand Down
124 changes: 124 additions & 0 deletions c/cpool64.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@


/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

#ifdef METTLE
#include <metal/metal.h>
#include <metal/stddef.h>
#include <metal/stdint.h>
#include <metal/stdlib.h>
#include <metal/string.h>
#else
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#endif

#include "zowetypes.h"
#include "alloc.h"
#include "cpool64.h"
#include "zos.h"

#define IARCP64_PARMLIST_LENGTH 72

uint64_t iarcp64Create(bool isCommon, int cellSize, int *returnCodePtr, int *reasonCodePtr){
uint64_t cpid = 0;
char header[24];
int returnCode = 0;
int reasonCode = 0;
char parmlist[IARCP64_PARMLIST_LENGTH];
if (isCommon){
__asm(ASM_PREFIX
" IARCP64 REQUEST=BUILD,CELLSIZE=%3,OUTPUT_CPID=%0,"
"HEADER=%1,COMMON=YES,OWNER=HOME,DUMP=NO,FPROT=NO,"
"TYPE=PAGEABLE,CALLERKEY=YES,TRAILER=NO,FAILMODE=RC,"
"RETCODE=%4,RSNCODE=%5,MF=(E,%2,COMPLETE) \n"
:
:
"m"(cpid),"m"(header),"m"(parmlist),"m"(cellSize),"m"(returnCode),"m"(reasonCode)
);
} else{
__asm(ASM_PREFIX
" IARCP64 REQUEST=BUILD,CELLSIZE=%3,OUTPUT_CPID=%0,"
"HEADER=%1,COMMON=NO,OWNINGTASK=CMRO,DUMP=NO,FPROT=NO,"
"TYPE=PAGEABLE,CALLERKEY=YES,TRAILER=NO,FAILMODE=RC,"
"RETCODE=%4,RSNCODE=%5,MF=(E,%2,COMPLETE) \n"
:
:
"m"(cpid),"m"(header),"m"(parmlist),"m"(cellSize),"m"(returnCode),"m"(reasonCode)
);
}
*returnCodePtr = returnCode;
*reasonCodePtr = reasonCode;
return cpid;
}

void *iarcp64Get(uint64_t cpid, int *returnCodePtr, int *reasonCodePtr){
uint64_t cellAddr = 0;
int returnCode = 0;
int reasonCode = 0;
char f4sa[160];
__asm(ASM_PREFIX
" LAE 13,%4 \n" /* Required by REG=SAVE */
" IARCP64 REQUEST=GET,INPUT_CPID=%3,REGS=SAVE,"
"CELLADDR=%0,TRACE=NO,EXPAND=YES,FAILMODE=RC,"
"RETCODE=%1,RSNCODE=%2 \n"
:
"=m"(cellAddr),"=m"(returnCode),"=m"(reasonCode)
:
"m"(cpid),"m"(f4sa)
);
*returnCodePtr = returnCode;
*reasonCodePtr = reasonCode;
return (void*)cellAddr;
}

void iarcp64Free(uint64_t cpid, void *cellAddr){
char f4sa[160];
__asm(ASM_PREFIX
" LAE 13,%2 \n" /* Required by REG=SAVE */
" IARCP64 REQUEST=FREE,INPUT_CPID=%1,REGS=SAVE,"
"CELLADDR=%0 \n"
:
:
"m"(cellAddr),"m"(cpid),"m"(f4sa)
);
}

int iarcp64Delete(uint64_t cpid, int *reasonCodePtr){
int returnCode = 0;
int reasonCode = 0;
__asm(ASM_PREFIX
" IARCP64 REQUEST=DELETE,INPUT_CPID=%2 \n"
" ST 15,%0 \n"
" ST 0,%1 "
:
"=m"(returnCode),"=m"(reasonCode)
:
"m"(cpid)
);
*reasonCodePtr = reasonCode;
return returnCode;
}


/*
This program and the accompanying materials are
made available under the terms of the Eclipse Public License v2.0 which accompanies
this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html
SPDX-License-Identifier: EPL-2.0
Copyright Contributors to the Zowe Project.
*/

Loading

0 comments on commit caacd0c

Please sign in to comment.