Results for volatile
Suppose I have the following function: void atomic_add(volatile unsigned * loc, unsigned incr ); And I have want to pass a variable to the first argum...
I'm learning about concurrency in Java and I'm watching a YouTube video. It is an explanation about increment operation in a multi-threading environme...
I am trying to use a shared index to indicate that data has been written to a shared circular buffer. Is there an efficient way to do this on ARM (arm...
I'm writing a C library for STM32 and ran into a problem. I have typedef struct: typedef struct foo { // some struct elements } foo; Volatile vari...
5.1.2.3 defines the following: In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need no...
On a STM32 ARM Cortex M4, I have a simple bare metal blinky which strobes a LED on. It works fine when I use a spin wait: typedef volatile uint32_t v...
Consider the following code: public class MyDataStructure { int size; final ReentrantLock lock = new ReentrantLock(); public void update...
What is the difference, if any, of the Read(Int64) method of the .NET system classes System.Threading.Volatile and System.Threading.Interlocked? Spec...
Everything I've read about volatile says it's never safe, but I still feel inclined to try it, and I haven't seen this specific scenario declared unsa...
MSDN states that: Reads and writes of other types, including long, ulong, double, and decimal, as well as user-defined types, need not be atomic. C#...
I asked this function based on this concept (maybe incorrect?!): Wherever a const can exist, a volatile can exist at the place. class classA { public...
How do I make an array volatile? Because as I've come to understand, it's unsafe to make an array volatile? ...
A question like mine has been asked, but mine is a bit different. The question is, "Why is the volatile keyword not allowed in C# on types System.Dou...
I know when reading from a location of memory which is written to by several threads or processes the volatile keyword should be used for that locatio...
Can anyone provide a good explanation of the volatile keyword in C#? Which problems does it solve and which it doesn't? In which cases will it save me...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?