Table of Contents

Name

CreateShMem - create a shared memory partition

Description

CreateShMemIPC creates and initializes a shared memory partition for the AccelNET database.

This function is part of tblmngr.

Syntax

int CreateShMemIPC(
   char **MTpnt,

   int *Memid,

   int key,

   int size,

   int perm,

   char *addr,

   int *create,

   int quiet_flag

   );

Arguments

**MTpnt

Pointer to a pointer to the MASTER_SIZE record which contains the table size information.

*Memid

Pointer to an integer in which to return the shared memory id returned by the call to CreateShMem(3tbl) .

key

the shared memory key.

size

size of the partition.

perm

Write permissions.

*addr

Addr to attach the partition to.

*create


create status
0 = existing partition
1 = created new partition

quiet_flag

If this value is non zero then suppress error messages from the function.

Returns


0 - success
1 - create failure
2 - attach failure

Notes

There is another function CreateShMemMMAP() which is listed in the header file but is not in use. This function may be used in the future for shared memory management using mmap() calls rather then SysV IPC calls.

See Also

tblmngr(3tbl)

Manual page revision

$Id: CreateShMem.3,v 1.3 2005/06/17 14:42:24 kitchen Exp $


Table of Contents