Skip to content

Instantly share code, notes, and snippets.

View raminfp's full-sized avatar
✔️
Verified

Ramin Farajpour Cami raminfp

✔️
Verified
View GitHub Profile
@aperezdc
aperezdc / atomic.h
Created October 11, 2014 12:55
Replacement for the Linux kernel asm/atomic.h header using GCC built-ins
#ifndef _ATOMIC_H
#define _ATOMIC_H
/* Check GCC version, just to be safe */
#if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC_MINOR__ < 1)
# error atomic.h works only with GCC newer than version 4.1
#endif /* GNUC >= 4.1 */
/**