From be71ca4f577474a6c7c8ef9c670150c0f045c5e8 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 22 Sep 2009 22:02:57 +0000 Subject: [PATCH] Some minor updates just in case someone really tries to build on BeOS (with an external build system, as natively building is not supported anymore). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33238 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/bus_managers/usb/BeOSCompatibility.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h b/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h index 26247bf427..18df828a40 100644 --- a/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h +++ b/src/add-ons/kernel/bus_managers/usb/BeOSCompatibility.h @@ -11,6 +11,8 @@ #define IS_USER_ADDRESS(x) (((uint32)x & 0x80000000) > 0) #define IS_KERNEL_ADDRESS(x) (((uint32)x & 0x80000000) == 0) +#define B_SPINLOCK_INITIALIZER 0 +#define PCI_usb_ehci 0x20 #ifndef HAIKU_TARGET_PLATFORM_DANO enum { @@ -29,6 +31,9 @@ enum { }; #endif +// wrong, but it won't change for BeOS anymore +typedef uint32 addr_t; + typedef struct mutex { sem_id sem; @@ -102,6 +107,13 @@ snprintf(char *buffer, size_t bufferSize, const char *format, ...) return result; } + +inline int32 +atomic_get(vint32 *value) +{ + return atomic_or(value, 0); +} + #undef B_KERNEL_READ_AREA #define B_KERNEL_READ_AREA 0 #undef B_KERNEL_WRITE_AREA