[erlang-patches] Remove mutex lock around sys_gettimeofday() in os:timestamp/0

Björn Gustavsson bgustavsson@REDACTED
Sat Jan 23 10:33:54 CET 2010


On Sat, Jan 23, 2010 at 12:41 AM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> Remove mutex lock around sys_gettimeofday() in os:timestamp/0
>
> In the erlang-questions thread "os:timestamp() uses mutex lock"
> Jonas Falkevik questioned the need for a mutex lock in os:timestamp/0.
> Kenneth Lundin confirmed that the lock is not needed and asked for
> a patch.
>
> git fetch git://github.com/tuncer/otp.git os_timestamp_no_mutex

Thanks!

Since you seems to have based your branch on 'pu', I have rebased
your branch on ccase/r13b04_dev.

Since I have touched the commit anyway, I also edited the
commit message to be more informative regarding the
technical details:

    In the erlang-questions thread "os:timestamp() uses mutex lock"
    Jonas Falkevik questioned the need for a mutex lock in
    os:timestamp/0. The mutex lock *is* needed in erlang:now()
    to guarantee the uniqueness of the returned time, but serves
    no useful purpose in os:timestamp().

If you are not happy with this change, please edit the text and
submit the branch again.

(I will push 'pu' with your branch included later today.)
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list