diff --git a/include/fcmp.h b/include/fcmp.h index 804f127..a89c3c7 100644 --- a/include/fcmp.h +++ b/include/fcmp.h @@ -7,6 +7,8 @@ #define _FORCE_INLINE extern inline __attribute__((gnu_inline)) #endif +#define _ALIAS __attribute__((may_alias)) + #ifdef DEBUG #define __name(d) #d #define dprintf(fmt, ...) printf("[dbg @" __FILE__ "->%s:%d] " fmt "\n", __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__) diff --git a/src/main.c b/src/main.c index 4d3c5a4..853d40a 100644 --- a/src/main.c +++ b/src/main.c @@ -58,7 +58,8 @@ static int compare_then_close(const mmap_t * restrict map1, mmap_t map2) #ifdef _RUN_THREADED struct t_task { - _Atomic int* othis; + _Atomic int* _ALIAS othis; + _Atomic bool* _ALIAS ocontinue; int ithis; const char* fthis; @@ -91,6 +92,11 @@ void proc_thread(vec_t* restrict v_tasks) register int rval=0; for(register int i=0;i