-#include "IOKit/IOLocks.h"
-#undef super
-#define super IOEventSource
-OSDefineMetaClassAndStructors(IOPMPowerStateQueue, IOEventSource);
-
-#ifdef __i386__ /* ppc does this right and doesn't need these routines */
-static
-void * OSDequeueAtomic(void ** inList, SInt32 inOffset)
-{
- void * oldListHead;
- void * newListHead;
-
- do {
- oldListHead = *inList;
- if (oldListHead == NULL) {
- break;
- }
-
- newListHead = *(void **) (((char *) oldListHead) + inOffset);
- } while (! OSCompareAndSwap((UInt32)oldListHead,
- (UInt32)newListHead, (UInt32 *)inList));
- return oldListHead;
-}
-
-static
-void OSEnqueueAtomic(void ** inList, void * inNewLink, SInt32 inOffset)
-{
- void * oldListHead;
- void * newListHead = inNewLink;
- void ** newLinkNextPtr = (void **) (((char *) inNewLink) + inOffset);
-
- do {
- oldListHead = *inList;
- *newLinkNextPtr = oldListHead;
- } while (! OSCompareAndSwap((UInt32)oldListHead, (UInt32)newListHead,
- (UInt32 *)inList));
-}
-#endif /* __i386__ */