#include "librace.h"
-using namespace std;
-
/**
This is an example about how to specify the correctness of the
read-copy-update synchronization mechanism.
@DefineFunc:
bool equals(Data *ptr1, Data *ptr2) {
- if (ptr1->data1 == ptr2->data2
+ if (ptr1->data1 == ptr2->data1
&& ptr1->data2 == ptr2->data2
&& ptr1->data3 == ptr2->data3) {
return true;
*/
thrd_t t1, t2;
+ data.store(NULL, memory_order_relaxed);
Data *data_init = (Data*) malloc(sizeof(Data));
data_init->data1 = 1;
data_init->data2 = 2;