5

It appears that POSIX defines two different optional IPC APIs that provide shared memory: the XSI extension (shmget, shmctl, shmdt) and the Realtime option group (shm_open, shm_unlink). The documentation on opengroup for shmget says, in the Application Usage section, that if I write sofware that uses the XSI routines, it should be easily modified to use the routines in the Realtime extension.

Does this mean that the routines in the Realtime extension should be preferred, if available?

Is one set intended to eventually replace the other?

Which set is more 'future-proof'?

Regards, David

sinjin
  • 189
  • 1
  • 6
  • 2
    `shm{get,ctl,at,dt}` is the traditional System V shmem, and `shm_{open,unlink}` is the "new" and improved POSIX shmem. – ninjalj Sep 11 '13 at 13:45
  • 1
    Thanks ninjalj. So, XSI (X/Open something something) == 'old unix stuff'? Is the 'XSI extension' generally regarded as part of POSIX or not? – sinjin Sep 11 '13 at 13:59
  • 1
    I found that `shm_open` is faster (on CentOS 6). My Linux book says that `shmget` is more portable. You pick! – Mark Lakata Sep 30 '14 at 21:25

0 Answers0