Review Request: Add spinlocks lock type, based on GCC intrisincs

Michael Pyne mpyne at kde.org
Mon Sep 3 23:06:12 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106224/#review18472
-----------------------------------------------------------


OK, I've committed a spinlock implementation that should work on OpenBSD without relying on GCC intrinsics alone (it does rely on Qt's atomic classes though).

Instead of making the additional functions used wait for the CMake changes I've simply checked for _POSIX_PRIORITY_SCHEDULING as documented in the Linux manpage (and verified not to be defined in OpenBSD's unistd.h or cdefs.h, since sched_yield isn't provided in sched.h).

Since the standards regarding sched_yield in particular seem to have changed several times recently (most recently moving to the Base specification for SUS) the only safe thing would be to have a CMake check for that specific function even if the POSIX feature checks appear to support it being available. But that will need to be worked on in the 4.10 branch.

- Michael Pyne


On Aug. 26, 2012, 7:09 p.m., Vadim Zhukov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106224/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2012, 7:09 p.m.)
> 
> 
> Review request for kdelibs and Michael Pyne.
> 
> 
> Description
> -------
> 
> Add simple spin locking mechanism.
> Written by Michael Pyne as from https://bugs.kde.org/attachment.cgi?id=73282 , with some tweaking by me.
> 
> 
> This addresses bug 305023.
>     http://bugs.kde.org/show_bug.cgi?id=305023
> 
> 
> Diffs
> -----
> 
>   kdecore/util/ConfigureChecks.cmake fe9f47e 
>   kdecore/util/config-util.h.cmake 83ccdf7 
>   kdecore/util/kshareddatacache_p.h ec5a7a0 
> 
> Diff: http://git.reviewboard.kde.org/r/106224/diff/
> 
> 
> Testing
> -------
> 
> On OpenBSD-CURRENT, i386
> 
> 
> Thanks,
> 
> Vadim Zhukov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120903/68d0c040/attachment.htm>


More information about the kde-core-devel mailing list