Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!kddlab!icot32!okilab!sh8810!ascgw!ascwide!wnoc-tyo-news!toumon!wsdohr!noro From: noro@ohara.info.waseda.ac.jp (Hideo Noro) Newsgroups: comp.os.mach Subject: shm*() can use on MACH? Message-ID: Date: 3 May 91 05:39:21 GMT Sender: news@ohara.info.waseda.ac.jp Distribution: comp Organization: Ohara Lab., Dept. of Sci. and Eng., Waseda Univ., JAPAN Lines: 50 Nntp-Posting-Host: wsdohr Hello. I've been reading this news group for few weeks. I wanna run some system on MACH2.5 (I use LUNA88K(omron)), but MACH seems not to support shared memory system calls (shm{get,at,dt,ctl}). Does sombody know how to make shm* system calls compatible library, or where I could anonymous ftp if possible? The system uses shm* system calls below. So, not full-compatibility shm* library (or advice how to make that) is welcome. ------------------- shmget(XVREGION_KEY, 1024, 0666) shmget(XVREGION_KEY, size, 00666 | IPC_CREAT) shmat(id, 0, 0) shmdt(id) shmctl(id, IPC_RMID, 0) shmctl(id, IPC_STAT, &buf) /* system references only buf.shm_atime */ ------------------- I don't know much of MACH, but think; shmget(key, size, 0666 | IPC_CREAT): use vm_allocate(target_task, address, sizeof(struct shmid_ds) + size, TRUE), vm_inherit(target_task, address, sizeof(struct shmid_ds) + size, VM_INHERIT_SHARE), and target_task has some relation to key, returns some number related to address. (also check key has already related some address or not.) shmat(id, 0, 0): returns (address + sizeof(struct shmid_ds)). shmdt(id): nothing to do. shmctl(id, IPC_STAT, &buf): copies sizeof(struct shmid_ds) bytes of memory image begin at address. I don't know if these are correct or not. Since, I'm not sure target_task can perform like 'key' which is used in shm*. Any comments are welcome. Thanks. ---- Hideo Noro Ohara Lab., Dept. of Sci. and Eng., Waseda Univ., JAPAN noro@ohara.info.waseda.ac.jp