shmctl(2) patch

Conrad Scott
Mon Jun 10 17:29:00 GMT 2002

[Please ignore the patch attached to the previous email: I got it wrong.

Attached is a patch to add the shmctl(2) interfaces required by ipcs(8)
(following Linux's example tho' not their exact implementation or code).
While I was at it, I've also made the following changes:

*) Added spare fields to the existing shmid_ds structure for future
expansion; ditto for the new shminfo structure. (Tip of the hat to Linux

*) There was a problem with having two types called shmid_ds (one a class
for internal use, another a struct for i/face use), which was that they are
both needed to implement shmctl(2) in the dll. So, I've given them different
names, so they can co-exist, and made the class have an instance of the
structure as a field.

*) And I shuffled things around in the two header files in the process: it
satisfies my sense of aesthetics now, YMMV :-)

The ipctests compile and work against these new headers files (i.e. they're
source, tho' not binary, compatible with the previous versions).

I'll go back to looking to see if I can get the shm sub-system working with
the socket transport next (or, at least, trying to understand why it doesn't
work at the moment).


// Conrad

2002-06-10  Conrad Scott  <>

 * include/sys/ipc.h: Reorganize file. Add IPC_INFO flag.
 * include/sys/shm.h: Reorganize file. Add SHM_STAT flag.
 (struct shmid_ds): Add spare fields.
 (struct shminfo): New struct.
 (class cygshmid_ds): New class to replace internal shmid_ds class.
 * Update for new cygshmid_ds class.
 * Ditto.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shmctl.patch
Type: application/octet-stream
Size: 10278 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list