X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/4452a7af2eac33dbad800bcc91f2399d62c18f53..e2d2fc5c71f7d145cba7267989251af45e3bb5ba:/osfmk/i386/simple_lock.h diff --git a/osfmk/i386/simple_lock.h b/osfmk/i386/simple_lock.h index ad2c33893..563c17739 100644 --- a/osfmk/i386/simple_lock.h +++ b/osfmk/i386/simple_lock.h @@ -72,9 +72,6 @@ #if defined(MACH_KERNEL_PRIVATE) && defined(__APPLE_API_PRIVATE) #include #include -#endif - -#if defined(MACH_KERNEL_PRIVATE) && defined(__APPLE_API_PRIVATE) #if MACH_LDEBUG #define USLOCK_DEBUG 1 @@ -85,19 +82,21 @@ typedef struct uslock_debug { void *lock_pc; /* pc where lock operation began */ void *lock_thread; /* thread that acquired lock */ + void *unlock_thread; /* last thread to release lock */ + void *unlock_pc; /* pc where lock operation ended */ unsigned long duration[2]; unsigned short state; unsigned char lock_cpu; - void *unlock_thread; /* last thread to release lock */ unsigned char unlock_cpu; - void *unlock_pc; /* pc where lock operation ended */ } uslock_debug; typedef struct slock { hw_lock_data_t interlock; /* must be first... see lock.c */ +#if USLOCK_DEBUG unsigned short lock_type; /* must be second... see lock.c */ #define USLOCK_TAG 0x5353 uslock_debug debug; +#endif } usimple_lock_data_t, *usimple_lock_t; extern void i386_lock_unlock_with_flush( @@ -105,7 +104,7 @@ extern void i386_lock_unlock_with_flush( #else typedef struct slock { - unsigned int lock_data[10]; + unsigned long lock_data[10]; } usimple_lock_data_t, *usimple_lock_t; #endif /* defined(MACH_KERNEL_PRIVATE) && defined(__APPLE_API_PRIVATE) */