Assigned to Ron as the most "complex" (part is a wrapper around the internal functions for fork and exit that he added) + an internal file access. @Ron: Please opt-out if you don't want to add it, but in general I think it is a low-hanging fruit.
Thank you!
The referenced routines and documentation can be found in https://www.microfocus.com/documentation/visual-cobol/vc90/DevHub/HRCLRHCALL0Z.html
CBL_ABORT_RUN_UNIT
would be currently only an internal STOP RUN
with a comment in the C parts to re-investigate as soon as we support threads.
CBL_EXEC_RUN_UNIT
is a wrapper around cob_sys_fork
and cob_sys_waitpid
.
CBL_YIELD_RUN_UNIT
may be implemented as an internal sleep with reasonable small time (something between 0.1 and 1 seconds - I tend to 0.5 or 0.1).
CBL_GET_SHMEM_PTR
and CBL_PUT_SHMEM_PTR
would use shmget()
and friends (doing a simple hash on the name to create the numeric key value) if that is available, otherwise can be implemented by internal files with the requested name as cob_gettmpdir ()
+"SHMEM_
+ name.
For Win32 someone potentially comes later that uses GetFileMapping()
and friends to implement it there...
Hello,
Is there a plan to include the 'CBL_EXEC_RUN_UNIT' to create synchronous or asynchronous run unit ?
I wish the project a fantastic 2024!
Alain
Diff: