man3tbl/BldMasterP

Table of Contents

Name

BldMasterPartition - create AccelNET master database partition

Description

BldMasterPartiton creates and initializes the shared memory partition for the AccelNET database. Usually this function is called by dbman(8) or dbmand(8) .

This function is part of tblmngr.

Syntax

HEADER_TBL *BldMasterPartition(
   MASTER_SIZE *SZpnt,

   char *s_key,

   char *s_addr,

   char *s_wperm,

   int *part_key,

   int *part_id,

   int *part_size,

   int *part_wperm,

   void **attach_addr,

   int InitFlag,

   int *CreateFlag

   );

Arguments

SZpnt

Pointer to the MASTER_SIZE record which contains the table size information.
s_key

shared memory key, if this is null the hardcoded default value is used
s_addr

attachment address, if this is null the hardcoded default value is used
s_wperm
permissions mask, if this is null the hardcoded default value is used
part_key

returned value - the shared memory key
part_id

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

returned value - the shared memory partition size
part_wperm

returned value - the shared memory partition permissions
attach_addr

returned value - the attachment address
InitFlag
If this is zero then the runtime structures in the database are initialized leaving the AccelNET parameters as they are.

If this is non zero then the database is cleared.

*CreateFlag
Pointer to an integer in which return the create status. If the returned value is zero then the partition already existed. If the returned value is non zero then the partition was created.

Returns

A pointer to the HEADER_TBL if successful. NULL is returned on most other failures.

See Also

tblmngr(3tbl)

Manual page revision

$Id: BldMasterP.3,v 1.4 2008/03/13 14:52:51 kitchen Exp $


Table of Contents