Lines Matching refs:me
181 static void work( PMHaltWorker * me );
182 static void checkTimeout( PMHaltWorker * me, AbsoluteTime * now );
2740 PMHaltWorker * me;
2744 me = OSTypeAlloc( PMHaltWorker );
2745 if (!me || !me->init())
2748 me->lock = IOLockAlloc();
2749 if (!me->lock)
2752 DEBUG_LOG("PMHaltWorker %p\n", me);
2753 me->retain(); // thread holds extra retain
2754 thread = IOCreateThread( &PMHaltWorker::main, me );
2757 me->release();
2760 return me;
2764 if (me) me->release();
2781 PMHaltWorker * me = (PMHaltWorker *) arg;
2785 me->depth = gPMHaltDepth;
2788 while (me->depth >= 0)
2790 PMHaltWorker::work( me );
2798 me->depth = gPMHaltDepth;
2806 me->depth = gPMHaltDepth - 1;
2809 } while (me->depth != gPMHaltDepth);
2815 DEBUG_LOG("All done for worker: %p (visits = %u)\n", me, me->visits);
2817 me->release();
2820 void PMHaltWorker::work( PMHaltWorker * me )
2835 inner = (OSSet *)gPMHaltArray->getObject(me->depth);
2852 service->setProperty(gPMHaltClientAcknowledgeKey, me))
2854 IOLockLock(me->lock);
2855 me->startTime = startTime;
2856 me->service = service;
2857 me->timeout = false;
2858 IOLockUnlock(me->lock);
2863 IOLockLock(me->lock);
2866 IOLockSleep(me->lock, me, THREAD_UNINT);
2868 me->service = 0;
2869 timeout = me->timeout;
2870 IOLockUnlock(me->lock);
2885 me->visits++;
2889 void PMHaltWorker::checkTimeout( PMHaltWorker * me, AbsoluteTime * now )
2897 IOLockLock(me->lock);
2898 if (me->service && !me->timeout)
2900 startTime = me->startTime;
2909 me->timeout = true;
2913 me->service->getName());
2916 IOLockUnlock(me->lock);