ia64/xen-unstable

view unmodified_drivers/linux-2.6/compat-include/linux/mutex.h @ 12460:22e58b2b0b45

[IA64] warning fix

These are pulled in through the ACPI header now

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Sun Oct 29 09:27:26 2006 -0700 (2006-10-29)
parents ecc1782f6968
children
line source
1 /*
2 * Copyright (c) 2006 Cisco Systems. All rights reserved.
3 *
4 * This file is released under the GPLv2.
5 */
7 /* mutex compatibility for pre-2.6.16 kernels */
9 #ifndef __LINUX_MUTEX_H
10 #define __LINUX_MUTEX_H
12 #include <linux/version.h>
14 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
15 #error "This version of Linux should not need compat mutex.h"
16 #endif
18 #include <linux/version.h>
19 #include <asm/semaphore.h>
21 #define mutex semaphore
22 #define DEFINE_MUTEX(foo) DECLARE_MUTEX(foo)
23 #define mutex_init(foo) init_MUTEX(foo)
24 #define mutex_lock(foo) down(foo)
25 #define mutex_lock_interruptible(foo) down_interruptible(foo)
26 /* this function follows the spin_trylock() convention, so *
27 * it is negated to the down_trylock() return values! Be careful */
28 #define mutex_trylock(foo) !down_trylock(foo)
29 #define mutex_unlock(foo) up(foo)
31 #endif /* __LINUX_MUTEX_H */