ntdll: Use lockfree implementation for get_cached_fd. (try 3)

Sebastian Lackner sebastian at fds-team.de
Mon Jun 9 22:08:12 CDT 2014

Thanks for all the feedback @ Ken, Daniel, Bruno and all the other
people I talked to.

Changes in try 3:

* Although the fd_cache_epoch was slightly faster in my tests (-> see
plots in mail for try 1) and should also work on PPC, its probably
better to choose a method which is easier to verify, and where we can be
sure, that it doesn't break with the next gcc release. ;) In this patch
I switched back to the old approach using interlocked_cmpxchg64 to
set/get both fd and associated attributes at the same time.

* Although used in some other places, its probably better to avoid
assert() for stuff, which should never be optimized away.

 dlls/ntdll/server.c |   50
 1 file changed, 46 insertions(+), 4 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ntdll-Use-lockfree-implementation-for-get_cached_fd.patch
Type: text/x-patch
Size: 4630 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140610/d6102178/attachment.bin>

More information about the wine-patches mailing list