Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 8

PgShmemCreate()

Create a block of shared memory

Synopsis:

void *PgShmemCreate( unsigned long size,
                     char const *name );

Library:

ph

Description:

This function creates a block of shared memory. The size argument determines the size of the block.

If you pass name as NULL, this function generates a unique name in the form Pg########; this is the preferred mode of operation. If you pass a name, make sure that it isn't already in use.


Note: You must use the “mx” form of a draw function to pass the shared memory reference. Otherwise, the data is copied into the draw event.

The Photon library uses atexit() to arrange for PgShmemCleanup() to be called when your program terminates normally. If your program terminates abnormally, it should call PgShmemCleanup() explicitly.

Returns:

A local pointer to shared memory. If an error occurs, it returns NULL and sets errno.

Errors:

See the errors for shm_open() in the QNX Neutrino Library Reference.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgDrawBitmapmx(), PgDrawImagemx(), PgShmemAttach(), PgShmemCleanup(), PgShmemDestroy(), PgShmemDetach()

shm_open() in the QNX Neutrino Library Reference


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 131

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgshmemcreate.html on line 131