Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-10 Thread Matteo Beccati
On 05/09/2014 17:38, guilhermebla...@gmail.com wrote: > After discussing with Matteo, I realized I was referring to POSIX > sempahores and not to System V. > > Patch looks ok to me. > > Is it possible to have this merged? I've seen no objections raised, so I committed it to PHP-5.6 and master.

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-05 Thread guilhermebla...@gmail.com
After discussing with Matteo, I realized I was referring to POSIX sempahores and not to System V. Patch looks ok to me. Is it possible to have this merged? Thanks, On Tue, Sep 2, 2014 at 11:03 AM, guilhermebla...@gmail.com < guilhermebla...@gmail.com> wrote: > It's also supported by System V

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread guilhermebla...@gmail.com
It's also supported by System V using exactly same API. Some references: http://fossies.org/dox/glibc-2.19/sem__timedwait_8c_source.html http://manned.org/sem_timedwait/83baa20c http://linux.die.net/man/3/sem_timedwait http://pubs.opengroup.org/onlinepubs/009695399/functions/sem_timedwait.html O

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread Matteo Beccati
On 02/09/2014 16:39, guilhermebla...@gmail.com wrote: > Hi Matteo, > > BSD does accept it as sem_timedwait, which I could find a reference for > FreeBSD: > > http://www.freebsd.org/cgi/man.cgi?query=sema&sektion=9 that's part of the FreeBSD Kernel Developer's Manual, not SysV semaphores ;) Che

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread guilhermebla...@gmail.com
Hi Matteo, BSD does accept it as sem_timedwait, which I could find a reference for FreeBSD: http://www.freebsd.org/cgi/man.cgi?query=sema&sektion=9 Cheers, On Tue, Sep 2, 2014 at 10:01 AM, Matteo Beccati wrote: > Hi, > > On 02/09/2014 15:38, guilhermebla...@gmail.com wrote: > > I'd propose i

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread Matteo Beccati
Hi, On 02/09/2014 15:38, guilhermebla...@gmail.com wrote: > I'd propose instead of accepting "nowait" only, I'd use a better support > and accept "until", dealing with possible cases: > > * -1: Blocks and wait until lock is acquired > * 0: Exactly what your patch does, attempt to grab and if

Re: [PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread guilhermebla...@gmail.com
Hi, Since I don't know where you guys like to discuss implementations, I'm pasting same thing I did in php-src PR: I'd propose instead of accepting "nowait" only, I'd use a better support and accept "until", dealing with possible cases: - -1: Blocks and wait until lock is acquired - 0: Ex

[PHP-DEV] Optional nowait argument to sem_acquire

2014-09-02 Thread Matteo Beccati
Hi everyone, the following patch: https://github.com/php/php-src/pull/741 has been lying around somewhere on my box since years and I recently stumbled upon it. However 5.6 was already RC and Ferenc suggested to eventually wait for 5.6.1. Do you think it's ok to add such a minor feature to 5.6