ASDAlexander77 / TypeScriptCompiler

TypeScript Compiler (by LLVM)
MIT License
631 stars 31 forks source link

implement atomics #29

Open ASDAlexander77 opened 1 year ago

ASDAlexander77 commented 1 year ago

Atomics https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/

Sinfolke commented 1 year ago

I decided to ask chatGPT about how to store and access shared memory in C. And it gave an answer. Read chat

Sinfolke commented 1 year ago

C seems also has stdatomic.h lib with functions: atomic_int atomic_flag atomic_store atomic_load atomic_add atomic_sub

ASDAlexander77 commented 1 year ago

I would use LLVM internals for it for example https://llvm.org/docs/Atomics.html