Giter Site home page Giter Site logo

Comments (2)

mbolt35 avatar mbolt35 commented on July 3, 2024

Yes, support for the GNU atomic built-ins is "kind of" there. After I read this page: [Multithreaded C Programming with the Adobe Flash C Compiler](https://github.com/adobe-flash/crossbridge/wiki/Multithreaded-C---programming-with-the-Adobe-Flash-C---Compiler-(FlasCC\)), I assumed that support was included for all of the built-ins mentioned here: Atomic Built-Ins

However, after some testing, __sync_val_compare_and_swap currently only supports 32-bit values. So, for example, __sync_bool_compare_and_swap will give you a nice error message:

"FlasCC does not support CAS on a non-32bit values..."

Other than the compare and swaps, all of the __sync_fetch_and_<action> and __sync_<action>_and_fetch implementations seem to be implemented and working correctly. Hope this helps.

from crossbridge.

cbakgly avatar cbakgly commented on July 3, 2024

Correct. Because flash vm is 32bit only.
Besides check out posix/libcHack.cpp for atomic ops.

Sent Via Apple Glass

ÔÚ 2013-9-7£¬7:49£¬Matt Bolt [email protected] дµÀ£º

Yes, support for the GNU atomic built-ins is "kind of" there. After I read this page: Multithreaded C Programming with the Adobe Flash C Compiler, I assumed that support was included for all of the built-ins mentioned here: Atomic Built-Ins

However, after some testing, __sync_val_compare_and_swap currently only supports 32-bit values. So, for example, __sync_bool_compare_and_swap will give you a nice error message:

"FlasCC does not support CAS on a non-32bit values..."
Other than the compare and swaps, all of the _sync_fetch_and and _sync_and_fetch implementations seem to be implemented and working correctly. Hope this helps.

¡ª
Reply to this email directly or view it on GitHub.

from crossbridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.