Kodi Community Forum
[WIN32] Atomics and inline assembler - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [WIN32] Atomics and inline assembler (/showthread.php?tid=206941)



[WIN32] Atomics and inline assembler - Paxxi - 2014-10-21

in xbmc/threads/Atomics.h/cpp there's a few different cas and Atomic instructions that all use assembler. What I'm curious about is why this is and why they're not using the provided Interlocked* functions in Windows?

I didn't find anything checking the git history.

This currently isn't an issue but it could possibly hurt the x64 effort I believe Karlsson2k is working on?


RE: [WIN32] Atomics and inline assembler - ironic_monkey - 2014-10-21

probable reason: those functions weren't available on the xbox and this is legacy from then. no reason not to use the intrinsics as such.


RE: [WIN32] Atomics and inline assembler - Skixbmc - 2014-10-21

Too long ago for me, but you get the point https://github.com/Skixbmc/NOX/blob/master/xbmc/threads/Atomics.cpp


[WIN32] Atomics and inline assembler - Paxxi - 2014-10-21

But why did you only add it for 64-bit skixbmc?


RE: [WIN32] Atomics and inline assembler - Skixbmc - 2014-10-21

Reuse code which has proven to work.


RE: [WIN32] Atomics and inline assembler - Paxxi - 2014-10-23

fair point Smile