Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/include/atomic.h
Show All 32 Lines | |||||
#define _MACHINE_ATOMIC_H_ | #define _MACHINE_ATOMIC_H_ | ||||
#ifndef _SYS_CDEFS_H_ | #ifndef _SYS_CDEFS_H_ | ||||
#error this file needs sys/cdefs.h as a prerequisite | #error this file needs sys/cdefs.h as a prerequisite | ||||
#endif | #endif | ||||
#include <sys/atomic_common.h> | #include <sys/atomic_common.h> | ||||
#if !defined(__mips_n64) && !defined(__mips_n32) | |||||
#include <sys/_atomic64e.h> | |||||
#endif | |||||
/* | /* | ||||
* Note: All the 64-bit atomic operations are only atomic when running | * Note: All the 64-bit atomic operations are only atomic when running | ||||
* in 64-bit mode. It is assumed that code compiled for n32 and n64 | * in 64-bit mode. It is assumed that code compiled for n32 and n64 | ||||
* fits into this definition and no further safeties are needed. | * fits into this definition and no further safeties are needed. | ||||
* | * | ||||
* It is also assumed that the add, subtract and other arithmetic is | * It is also assumed that the add, subtract and other arithmetic is | ||||
* done on numbers not pointers. The special rules for n32 pointers | * done on numbers not pointers. The special rules for n32 pointers | ||||
* do not have atomic operations defined for them, but generally shouldn't | * do not have atomic operations defined for them, but generally shouldn't | ||||
▲ Show 20 Lines • Show All 799 Lines • Show Last 20 Lines |