test-and-set Questions

4

Solved

atomic_flag_test_and_set Yes! atomic_flag_clear Yes! atomic_flag_test_and_clear nope atomic_flag_set nope If you wanted to do something like set a flag on a event in some context, and in some oth...
Nunez asked 2/2 at 19:15

9

Solved

After reading the Test-and-Set Wikipedia entry, I am still left with the question "What would a Test-and-Set be used for?" I realize that you can use it to implement Mutex (as described in wikiped...
Achromatin asked 23/9, 2008 at 13:22

1

To handle concurrency in an M68000 assembly program, I need to understand how the TAS instruction works. I don't really care about the theoretical description that I can see from the manual (e.g. h...
Adebayo asked 10/1, 2021 at 11:14

3

Solved

Can the compiler or processor reorder the following instructions so that another Thread sees a == 0 and b == 1? Assuming int a = 0, b = 0; somewhere. System.Threading.Interlocked.CompareExchange&...
Draftee asked 25/8, 2014 at 20:0

5

Solved

What do you mean by Atomic instructions? How does the following become Atomic? TestAndSet int TestAndSet(int *x){ register int temp = *x; *x = 1; return temp; } From a software perspective,...

3

Solved

I know that the .NET memory model (on the .NET Framework; not compact/micro/silverlight/mono/xna/what-have-you) guaranteed that for certain types (most notably primitive integers and references) op...
1

© 2022 - 2024 — McMap. All rights reserved.