From ecd60dec1aac9a5a2501ae446730076b187e733a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 23 Sep 2009 02:26:54 +0000 Subject: [PATCH] Removing unused BeOS compatibility header. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33241 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../drivers/input/usb_hid/BeOSCompatibility.h | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/add-ons/kernel/drivers/input/usb_hid/BeOSCompatibility.h diff --git a/src/add-ons/kernel/drivers/input/usb_hid/BeOSCompatibility.h b/src/add-ons/kernel/drivers/input/usb_hid/BeOSCompatibility.h deleted file mode 100644 index cfbd47c72b..0000000000 --- a/src/add-ons/kernel/drivers/input/usb_hid/BeOSCompatibility.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Driver for USB Human Interface Devices. - Copyright (C) 2008 Michael Lotz - Distributed under the terms of the MIT license. -*/ -#ifndef HAIKU_TARGET_PLATFORM_HAIKU -#ifndef _BEOS_COMPATIBILITY_H_ -#define _BEOS_COMPATIBILITY_H_ - -#include - -typedef struct mutex { - sem_id sem; - int32 count; -} mutex; - - -static inline void -mutex_init(mutex *lock, const char *name) -{ - lock->sem = create_sem(0, name); - lock->count = 0; -} - - -static inline void -mutex_destroy(mutex *lock) -{ - delete_sem(lock->sem); -} - - -static inline status_t -mutex_lock(mutex *lock) -{ - if (atomic_add(&lock->count, -1) < 0) - return acquire_sem(lock->sem); - return B_OK; -} - - -static inline void -mutex_unlock(mutex *lock) -{ - if (atomic_add(&lock->count, 1) < -1) - release_sem(lock->sem); -} - -#endif /* !HAIKU_TARGET_PLATFORM_HAIKU */ -#endif /* _BEOS_COMPATIBILITY_H_ */