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/pgshmemattach.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/pgshmemattach.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/pgshmemattach.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/pgshmemattach.html on line 8
Record a shared memory reference
int PgShmemAttach( char const *name,
unsigned long size,
void *addr );
ph
This function records a reference to an existing block of
shared memory (that is, a block created with
shm_open(),
sized with
ftruncate(),
and mapped into the process's address space with
mmap()
— see the QNX Neutrino Library Reference).
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.
- 0
- Successful completion.
- -1
- An error occurred (
errno
is set).
See the errors for
shm_open()
in the QNX Neutrino Library Reference.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PgDrawBitmapmx(),
PgDrawImagemx(),
PgShmemCleanup(),
PgShmemCreate(),
PgShmemDestroy(),
PgShmemDetach()
atexit(),
errno,
ftruncate(),
mmap(),
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/pgshmemattach.html on line 133
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/pgshmemattach.html on line 133