return ($ret);
}
- function lock_data($table_idx)
+ static function lock_data($is_exclusive, $table_idx)
{
GLOBAL $sess;
return (FALSE);
}
// WARNING monitor this step
- if (($res = @sem_get($tok)) == FALSE) {
+ if (($res = @sem_get($tok, ($is_exclusive ? 1 : LOCK_SHARE_MAX) )) == FALSE) {
return (FALSE);
}
if (sem_acquire($res)) {
}
}
- function unlock_data($res_vect)
+ static function unlock_data($res_vect)
{
GLOBAL $sess;