CVS update: php3/doc/functions

From: Date: Wed, 06 Jan 1999 18:25:45 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-3342@lists.php.net to get a copy of this message
Date: Wednesday January 6, 1999 @ 13:25 Author: eschmid Update of /repository/php3/doc/functions In directory asf:/u/temp/cvs-serv10734/doc/functions Modified Files: sem.sgml Log Message: Rewrite of shared memory. Index: php3/doc/functions/sem.sgml diff -c php3/doc/functions/sem.sgml:1.2 php3/doc/functions/sem.sgml:1.3 *** php3/doc/functions/sem.sgml:1.2 Mon Dec 14 16:38:54 1998 --- php3/doc/functions/sem.sgml Wed Jan 6 13:25:44 1999 *************** *** 9,16 **** on the current machine, or to limit the number of processes that may simultaneously use a resource. <para> ! Shared memory support is also included. It is compatible with ! System V compatible systems. </partintro> <refentry id="function.sem-get"> --- 9,48 ---- on the current machine, or to limit the number of processes that may simultaneously use a resource. <para> ! This module provides also shared memory functions using System V ! shared memory. Shared memory may be used to provide access to ! global variables. Different httpd-daemons and even other programs ! (such as Perl, C, ...) are able to access this data to provide a ! global data-exchange. Remember, that shared memory is NOT safe ! against simultaneous access. Use semaphores for synchronization. ! ! <table> ! <title>Limits of shared memory by the Unix OS</title> ! <tgroup cols="2"> ! <tbody> ! <row> ! <entry>SHMMAX</entry> ! <entry>max size of shared memory, normally 131072 ! bytes</entry> ! </row> ! <row> ! <entry>SHMMIN</entry> ! <entry>minimum size of shared memory, normally 1 byte</entry> ! </row> ! <row> ! <entry>SHMMNI</entry> ! <entry>max amount of shared memory segments, normally ! 100</entry> ! </row> ! <row> ! <entry>SHMSEG</entry> ! <entry>max amount of shared memory per process, normally ! 6</entry> ! </row> ! </tbody> ! </tgroup> ! </table> ! </partintro> <refentry id="function.sem-get"> *************** *** 107,147 **** <refentry id="function.shm-attach"> <refnamediv> <refname>shm_attach</refname> ! <refpurpose>Creates or open a shared memory</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_attach</function></funcdef> ! <paramdef>long <parameter>key</parameter></paramdef> ! <paramdef>long <parameter>memsize</parameter></paramdef> ! <paramdef>long <parameter>perm</parameter></paramdef> ! </funcsynopsis> ! <para> ! Creates or open a shared memory with the given key and ! memsize. </refsect1> </refentry> <refentry id="function.shm-detach"> <refnamediv> <refname>shm_detach</refname> ! <refpurpose>Disconnects from shared memory</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_detach</function></funcdef> ! <paramdef>long <parameter>id</parameter></paramdef> </funcsynopsis> <para> ! Disconnects from shared memory with the given ! <parameter>id</parameter> created from ! <function>shm_attach</function>. Remember, that the shared memory still exist in the Unix system and the data is still present. </refsect1> </refentry> <refentry id="function.shm-put-var"> <refnamediv> <refname>shm_put_var</refname> --- 139,207 ---- <refentry id="function.shm-attach"> <refnamediv> <refname>shm_attach</refname> ! <refpurpose>Creates or open a shared memory segment</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_attach</function></funcdef> ! <paramdef>int <parameter>key</parameter></paramdef> ! <paramdef>int ! <parameter><optional>memsize</optional></parameter></paramdef> ! <paramdef>int ! <parameter><optional>perm</optional></parameter></paramdef> ! </funcsynopsis> ! <para> ! <function>shm_attach</function> returns an id that that can be ! used to access the System V shared memory with the given key, the ! first call creates the shared memory segment with mem_size ! (default: sysvshm.init_mem in php3.ini, otherwise 10000 bytes) ! and the optional perm-bits (default: 666). ! <para> ! A second call to <function>shm_attach</function> for the same ! <parameter>key</parameter> will return a different shared memory ! identifier, but both identifiers access the same underlying ! shared memory. <parameter>memsize</parameter> and ! <parameter>perm</parameter> will be ignored. </refsect1> </refentry> <refentry id="function.shm-detach"> <refnamediv> <refname>shm_detach</refname> ! <refpurpose>Disconnects from shared memory segment</refpurpose> </refnamediv> <refsect1> <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_detach</function></funcdef> ! <paramdef>int <parameter>shm_identifier</parameter></paramdef> </funcsynopsis> <para> ! <function>shm_detach</function> disconnects from the shared ! memory given by the <parameter>shm_identifier</parameter> created ! by <function>shm_attach</function>. Remember, that shared memory still exist in the Unix system and the data is still present. </refsect1> </refentry> + <refentry id="function.shm-remove"> + <refnamediv> + <refname>shm_remove</refname> + <refpurpose>Removes shared memory from Unix systems</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>int <function>shm_remove</function></funcdef> + <paramdef>int <parameter>shm_identifier</parameter></paramdef> + </funcsynopsis> + <para> + Removes shared memory from Unix systems. All data will be + destroyed. + </refsect1> + </refentry> + <refentry id="function.shm-put-var"> <refnamediv> <refname>shm_put_var</refname> *************** *** 152,173 **** <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_put_var</function></funcdef> ! <paramdef>int <parameter>id</parameter></paramdef> ! <paramdef>long <parameter>variable_key</parameter></paramdef> <paramdef>mixed <parameter>variable</parameter></paramdef> </funcsynopsis> <para> ! Inserts or updates a variable with a given variable_key. All ! variable-types (double, long, string, array) are supported. The ! function <function>serialize</function> can be used to store the ! data. </refsect1> </refentry> <refentry id="function.shm-get-var"> <refnamediv> ! <refname>shm_put_var</refname> ! <refpurpose>Reads a variable with a given variable_key </refpurpose> </refnamediv> <refsect1> --- 212,232 ---- <title>Description</title> <funcsynopsis> <funcdef>int <function>shm_put_var</function></funcdef> ! <paramdef>int <parameter>shm_identifier</parameter></paramdef> ! <paramdef>int <parameter>variable_key</parameter></paramdef> <paramdef>mixed <parameter>variable</parameter></paramdef> </funcsynopsis> <para> ! Inserts or updates a <parameter>variable</parameter> with a given ! <parameter>variable_key</parameter>. All variable-types (double, ! int, string, array) are supported. </refsect1> </refentry> <refentry id="function.shm-get-var"> <refnamediv> ! <refname>shm_get_var</refname> ! <refpurpose>Returns a variable from shared memory </refpurpose> </refnamediv> <refsect1> *************** *** 175,186 **** <funcsynopsis> <funcdef>mixed <function>shm_get_var</function></funcdef> <paramdef>int <parameter>id</parameter></paramdef> ! <paramdef>long <parameter>variable_key</parameter></paramdef> </funcsynopsis> <para> ! Reads a variable with a given <parameter>variable_key</parameter>. ! The variable is still present in the shared memory. The function ! <function>unserialize</function> can be used to decode the data. </refsect1> </refentry> --- 234,245 ---- <funcsynopsis> <funcdef>mixed <function>shm_get_var</function></funcdef> <paramdef>int <parameter>id</parameter></paramdef> ! <paramdef>int <parameter>variable_key</parameter></paramdef> </funcsynopsis> <para> ! <function>shm_get_var</function> returns the variable with a given ! <parameter>variable_key</parameter>. The variable is still present ! in the shared memory. </refsect1> </refentry> *************** *** 195,225 **** <funcsynopsis> <funcdef>int <function>shm_remove_var</function></funcdef> <paramdef>int <parameter>id</parameter></paramdef> ! <paramdef>long <parameter>variable_key</parameter></paramdef> </funcsynopsis> <para> Removes a variable with a given <parameter>variable_key</parameter> ! from shared memory. </refsect1> </refentry> - - <refentry id="function.shm-remove"> - <refnamediv> - <refname>shm_remove</refname> - <refpurpose>Removes shared memory</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcdef>int <function>shm_remove</function></funcdef> - <paramdef>long <parameter>key</parameter></paramdef> - </funcsynopsis> - <para> - Removes shared memory from the Unix system. All data will be - destroyed. - </refsect1> - </refentry> - <!-- Keep this comment at the end of the file --- 254,266 ---- <funcsynopsis> <funcdef>int <function>shm_remove_var</function></funcdef> <paramdef>int <parameter>id</parameter></paramdef> ! <paramdef>int <parameter>variable_key</parameter></paramdef> </funcsynopsis> <para> Removes a variable with a given <parameter>variable_key</parameter> ! and frees the occupied memory. </refsect1> </refentry> <!-- Keep this comment at the end of the file -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3342) next »