Lines Matching refs:looper

63 port_id _get_looper_port_(const BLooper* looper);
103 BLooper* looper;
128 // In case the looper thread calls Quit() fLastMessage is not deleted.
265 // After returning from DispatchMessage(), the looper will be
533 printf("ERROR - you must Lock a looper before calling Quit(), "
534 "team=%" B_PRId32 ", looper=%s\n", Team(),
551 PRINT((" We are the looper thread\n"));
556 PRINT((" Run() has already been called and we are not the looper thread\n"));
558 // As with sem in _Lock(), we need to cache this here in case the looper
562 // We need to unlock here. Otherwise the looper thread can't
573 // We have to wait until the looper is done processing any remaining
634 // The looper is gone, so of course it's not locked
768 status_t status = data->AddString("suites", "suite/vnd.Be-looper");
919 Locks a looper either by port or using a direct pointer to the looper.
921 \param looper looper to lock, if not NULL
922 \param port port to identify the looper in case \a looper is NULL
926 BLooper::_Lock(BLooper* looper, port_id port, bigtime_t timeout)
928 PRINT(("BLooper::_Lock(%p, %lx)\n", looper, port));
931 if (looper == NULL && port < 0) {
945 // Look up looper by port_id, if necessary
946 if (looper == NULL) {
947 looper = gLooperList.LooperForPort(port);
948 if (looper == NULL) {
952 } else if (!gLooperList.IsLooperValid(looper)) {
953 // Check looper validity
959 if (currentThread == looper->fOwner) {
960 ++looper->fOwnerCount;
961 PRINT(("BLooper::_Lock() done 5: fOwnerCount: %ld\n", looper->fOwnerCount));
966 // unlocked the looper list
967 sem = looper->fLockSem;
974 oldCount = atomic_add(&looper->fAtomicCount, 1);
977 return _LockComplete(looper, oldCount, currentThread, sem, timeout);
982 BLooper::_LockComplete(BLooper* looper, int32 oldCount, thread_id thread,
997 looper->fOwner = thread;
998 looper->fCachedStack = (addr_t)&err & ~(B_PAGE_SIZE - 1);
999 looper->fOwnerCount = 1;
1025 name = "anonymous looper";
1044 // this will also lock this looper
1055 // wakeup looper when being called from other threads if necessary
1060 // looper
1080 BLooper* looper = (BLooper*)arg;
1084 if (looper->Lock()) {
1085 PRINT(("LOOPER: looper locked\n"));
1086 looper->task_looper();
1088 delete looper;
1176 // Check that looper is locked (should be)
1178 // Unlock the looper
1182 debugger("looper must not be locked!");
1221 // No more messages: Unlock the looper and terminate the
1269 // we leave the looper locked when we quit
1276 // Unlock the looper
1322 debugger("looper must be locked before proceeding\n");
1340 debugger("Targeted handler does not belong to the looper.");
1363 debugger("Targeted handler does not belong to the looper.");
1426 // it is used in situations where it's clear that the looper is valid,
1466 // check that new target is owned by looper; use IndexOf() to avoid
1468 // destruction by another looper)
1494 // There is now one less thread holding a lock on this looper
1506 _get_looper_port_(const BLooper* looper)
1508 return looper->fMsgPort;