00001 /* 00002 * Operating system kernel abstraction -- spinlocks 00003 * 00004 * Copyright (C) 2007 Cambridge Silicon Radio Ltd. 00005 * 00006 * Refer to LICENSE.txt included with this source code for details on 00007 * the license terms. 00008 */ 00009 #ifndef __OSKA_SPINLOCK_H 00010 #define __OSKA_SPINLOCK_H 00011 00012 #ifdef __OSKA_API_DOC 00013 00022 typedef implementation_defined os_spinlock_t; 00023 00033 void os_spinlock_init(os_spinlock_t *lock); 00034 00044 void os_spinlock_destroy(os_spinlock_t *lock); 00045 00057 void os_spinlock_lock_intsave(os_spinlock_t *lock, os_int_status_t *int_state); 00058 00069 void os_spinlock_unlock_intrestore(os_spinlock_t *lock, os_int_status_t *int_state); 00070 00071 #endif /* __OSKA_API_DOC */ 00072 00073 #ifdef linux 00074 # include <../linux/spinlock.h> 00075 #elif defined(KMDF_MAJOR_VERSION) 00076 # include <../windows/kmdf/spinlock.h> 00077 #else 00078 # error <oska/spinlock.h> not provided for this OS 00079 #endif 00080 00081 #endif /* #ifndef __OSKA_SPINLOCK_H */