Park, Geon (re-st)

AFL이 동시성을 관리하는 방식

[repost] 1 min read

types.h

1#define MEM_BARRIER() \
2  __asm__ volatile("" ::: "memory")

The MEM_BARRIER() macro defined using __asm__ volatile("" ::: "memory") in C is a memory barrier used in programming, particularly when dealing with concurrency in multicore processors. It prevents the compiler from reordering the reads and writes of memory variables across this barrier, ensuring memory operations are completed as expected without any optimizations that could change the order. This is crucial in low-level programming where sequence and consistency of operations must be precisely controlled.

분류:동시성이론

<< Previous Post

|

Next Post >>

← 뒤로