History log of /fuchsia/zircon/third_party/ulib/musl/src/thread/mtx_timedlock.c
Revision Date Author Comments
# fe67cf48 13-Feb-2018 David Stevens <stevensd@google.com>

[ulib][musl] Use the correct clock types

Change-Id: Ibeb116be3ae15e7ae869ab0a96a4d1f5d77dd8de


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# fb2e0304 08-Jun-2017 Tim Kilbourn <tkilbourn@google.com>

[musl] Use new magenta errors

Change-Id: I72d62767392cb2ce84e1ed1b35a338ab3d716e4a


# c8404e7b 03-Jan-2017 Mark Seaborn <mseaborn@google.com>

[ulib] mtx_timedlock(): Partly fix absolute->relative timeout calculation

When a timedlock() operation is implemented using an
absolute-to-relative timeout calculation, this calculation must be
redone every time we do a futex_wait(). This is because when our
futex_wait() call returns, the mutex could have been claimed by
another thread, so that we'll have to wait again. If our timeout was
for 10 seconds, we don't want our second futex_wait to be for the full
10 seconds.

So, move the calculation into timedlock()'s loop.

Also rename mxr_mutex_timedlock() to add a "__" prefix, to indicate
that it shouldn't be used except by mtx_timedlock(). (timedlock()
operations aren't used very much anyway, and mxr_mutex_* is currently
only used to implement mtx_*.)

This change will also make it easier to convert this mutex
implementation to use a more efficient 3-state mutex instead of a
2-state mutex.

MG-361

Change-Id: I8d30b83be05f3f11a923ab59fa149375f3909632


# e6de6ba1 09-Nov-2016 George Kulakowski <kulakowski@google.com>

[musl][mtx_t] Convert absolute to relative timeout in mtx_timedlock

MG-360 #done

Change-Id: I4a4afbcb23aba3e13a3cc1a2aadd7b78f05e6579


# 92343217 27-Jun-2016 George Kulakowski <kulakowski@google.com>

[musl] Implement C11 mutexes in terms of runtime, not pthreads

Change-Id: I9d613790f86a309041d78c0500a08071bf890cc0


# 53b9e1c8 15-Jun-2016 The Fuchsia Authors <authors@fuchsia.local>

[magenta] Initial commit