четверг, 25 августа 2022 г. в 02:31:33 UTC+3, Arne Vajhøj:
> I assume that shm_open end up calling sys$mgblsc, but how does
> the arguments for sys$mgblsc get constructed?
shmp_open only opens/creates a file i.e. fd = open(name, oflag, mode, "shr=del,get,put,upd");
In the next step, you can use mmap and sys$crmpsc/sys$crmpsc_file/sys$crmpsc_file_64/etc are called here.
> Is the name just used as-is or is it changed?
It changes, of course. SYS$SCRATCH:DECC$SHM_ + name
> And what about flags? Just S_IWUSR to SEC$M_WRT or?
Yes, depending on how you need to create the mapping, the SEC$M_GBL, SEC$M_WRT, SEC$M_PAGFIL, SEC$M_CRF, etc. flags are used.
Vitaly