]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kernel.h
Merge branches 'x86/acpi', 'x86/asm', 'x86/cpudetect', 'x86/crashdump', 'x86/debug...
[linux-2.6-omap-h63xx.git] / include / linux / kernel.h
index 6b8e2027165eb9e810978dfaaf363174ab767cf4..7fa371898e3e76d8e1af870f049844ff71bea931 100644 (file)
@@ -476,6 +476,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
        __val = __val < __min ? __min: __val;   \
        __val > __max ? __max: __val; })
 
+
+/*
+ * swap - swap value of @a and @b
+ */
+#define swap(a, b) \
+       do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
+
 /**
  * container_of - cast a member of a structure out to the containing structure
  * @ptr:       the pointer to the member.