Add info of shared memory area

This commit is contained in:
Laurent Destailleur 2010-01-04 20:30:30 +00:00
parent 7deeb9cb89
commit 2c1d6b245d

View File

@ -33,6 +33,23 @@ $shmkeys=array('main'=>1,'admin'=>2,'dict'=>3,'companies'=>4,'suppliers'=>5,'pro
$shmoffset=100; $shmoffset=100;
/** \brief Return list of contents of all memory area shared
* \return int 0=Nothing is done, <0 if KO, >0 if OK
*/
function dol_listshmop()
{
global $shmkeys,$shmoffset;
$resarray=array();
foreach($shmkeys as $key => $val)
{
$result=dol_getshmop($key);
if (! is_numeric($result) || $result > 0) $resarray[$key]=$result;
}
return $resarray;
}
/** \brief Read a memory area shared by all users, all sessions on server /** \brief Read a memory area shared by all users, all sessions on server
* \param $memoryid Memory id of shared area * \param $memoryid Memory id of shared area
* \return int 0=Nothing is done, <0 if KO, >0 if OK * \return int 0=Nothing is done, <0 if KO, >0 if OK