Static Public Member Functions |
static void | pause () |
template<typename T > |
static void | atomic_and (T *ptr, T value) |
template<typename T > |
static void | atomic_or (T *ptr, T value) |
static void | atomic_set_bit (unsigned *vector, unsigned bit, bool value=true) |
static void | set_bit (unsigned *vector, unsigned bit, bool value=true) |
static bool | get_bit (unsigned *vector, unsigned bit) |
template<typename T > |
static T | xchg (volatile T *x, T y) |
static unsigned | cmpxchg4b (unsigned *var, unsigned oldvalue, unsigned newvalue) |
static unsigned | cmpxchg4b (volatile void *var, unsigned oldvalue, unsigned newvalue) |
static unsigned long long | cmpxchg8b (void *var, unsigned long long oldvalue, unsigned long long newvalue) |
static unsigned long long | cmpxchg8b (volatile void *var, unsigned long long oldvalue, unsigned long long newvalue) |
template<typename T , typename Y > |
static T | atomic_xadd (T volatile *ptr, Y value) |
static unsigned long long | rdtsc () |
static unsigned | bsr (unsigned value) |
| Finds the position of the most significant "1" bit.
|
static unsigned | bsf (unsigned value) |
| Finds the position of the least significant "1" bit.
|
static unsigned | minshift (unsigned long start, unsigned long size) |
| Calculates the order (log2 of the size) of the largest naturally aligned block that starts at start and is no larger than size.
|
static unsigned | maxalign (unsigned long offset, unsigned long begin, unsigned long begin2, unsigned long size) |
static int | popcount (unsigned int v) |
static int | popcount (unsigned long v) |
static unsigned | cpuid (unsigned eax, unsigned &ebx, unsigned &ecx, unsigned &edx) |
template<unsigned operand_size> |
static void | move (void *tmp_dst, void *tmp_src) |
static void | move (void *tmp_dst, void *tmp_src, unsigned order) |
| Transfer bytes from src to dst.
|