DitsDefineSdsShared - Defined a shared memory segment and export an SDS structure into it.

Function

Defined a shared memory segment and export an SDS structure into it.

Description

This routine wraps up the common sequence of creating a shared memory segement using DitsDefineShared() and exporting an SDS structure into it. The SDS id of the exported structure is returned.

See DitsDefineShared() for full details on shared memory.

Language

C

Call

(void) = DitsDefineSdsShared (Template, Type, Name, Key, Create, Address, SharedMemInfo, ID, Status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>TemplateSdsIdType Template Sds structure. The SDS structure placed in the shared memory shall be created using this SDS id and the SdsExportDefined() function.
>TypeintA code used to descibe the mapping type to be used. This must be one of the DITS_SHARE_xxxx codes, see DitsDefineShared(3).
>Namechar *Used to identify the mapped section on some machines. On UNIX, for example, if mapped files are used, this is the file name in question. If Name is not actually used on the current system it should be passed as a null string.
>KeyintOn some systems, this is an alternative way of specifying the mapped section. For example, if System V shared memory is used under UNIX, this is the i dentifier for that shared memory.
>CreateintIf true, the memory section does not actually exist and this routine is to create it. If this is the case, the Address field of the SharedMemInfo structure will give the address at which the memory section has been mapped, if it is mapped successfully.
!Addressvoid **On systems with global address spaces, eg. VxWorks, the address of the memory is enough to specify it completely - together with its size. In any case, if the section is already mapped, this argument must specify the address at which it is mapped. If the section is created by this routine, this is returned with the address at which the memory was mapped, which is why this is passed as the address of a void pointer and not just the pointer.
<SharedMemInfoDitsSharedMemInfoType *The structure filled by this routine to describe the shared memory section.
<IDSdsIdType *Id of exported Sds structure. The User should free this id when they are finished with it (probably when DitsReleaseShared() is invoked).
!StatusStatusType *Modified status. will be returned.

Include files

DitsBulk.h

See Also

The DITS Specification Document, DitsReleaseShared(3), DitsDefineShared(3), SdpCreateShared(3), DitsInitMessBulk(3), DitsTriggerBulk(3).

Prior requirements

None.

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tony.farrell@mq.edu.au