Skip to content

Commit

Permalink
experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
cjvolzka committed Jul 13, 2023
1 parent e884c4e commit aa4289e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Runtime/OMExternalConstant.inc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ void omMMapBinaryFile(
/* Prepare to compare-and-swap to setup the shared constAddr.
* If we fail, another thread beat us so free our mmap.
*/
if (!__sync_bool_compare_and_swap(&constAddr[0], NULL, tempAddr))
#ifdef __MVS__
void *expected = NULL;
if (cds((cds_t*)&expected, (cds_t*)&constAddr[0], *(cds_t *)&tempAddr))
#else
if (!__sync_bool_compare_and_swap(&constAddr[0], NULL, tempAddr))
#endif
munmap(tempAddr, size);

/* Either we succeeded in setting constAddr or someone else did it.
Expand Down

0 comments on commit aa4289e

Please sign in to comment.