![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FOjB36%2FbtqFkTmUKuW%2FbKsCRCkdSNrofeZiKXfsQ1%2Fimg.png)
[c++] CAS 구현 및 ABA 문제 해결 :: ABA 해결_1. int형 구현
목차 문제 정의 lock free 구현 ABA 해결 int형 구현(+ Hazard pointer) Counter 그 외의 방법들 mutex lock(spin lock)과의 비교 ABA 해결 int형 구현 ABA 문제는 매개변수를 int형으로 구현하면 쉽게 해결할 수 있다. 하지만 문제점은 존재한다(뒷부분에 언급). 코드 #define _CRT_SECURE_NO_WARNINGS #define NULL_INT -1 // NULL 값 #include #include #include #include #include // #include #include using namespace std; struct Node { int data; Node* next_node; }; int node_n; atomic free_l..
Comment