Lines Matching defs:thread
58 * Thread wrappers
69 * Create and run a new thread.
161 pthread_t thread;
162 int result = pthread_create(&thread, &attr,
176 *threadId = (android_thread_id_t)thread; // XXX: this is not portable
182 static pthread_t android_thread_id_t_to_pthread(android_thread_id_t thread)
184 return (pthread_t) thread;
215 ALOG(LOG_VERBOSE, "thread", "thread exiting\n");
220 * Create and run a new thread.
242 ALOG(LOG_WARN, "thread", "WARNING: thread create failed\n");
415 ALOG(LOG_WARN, "thread", "WARNING: bad result from unlocking mutex\n");
424 ALOG(LOG_WARN, "thread", "WARNING: bad result from try-locking mutex\n");
467 // An auto-reset event used by the broadcast/signal thread to wait
468 // for all the waiting thread(s) to wake up and be released from
518 // If we're the last waiter thread during this particular broadcast
525 // any thread has a chance to run. Without it, another thread
594 * Signal the condition variable, allowing one thread to continue.
669 * This is our thread object!
672 Thread::Thread(bool canCallJava)
675 mLock("Thread::mLock"),
684 Thread::~Thread()
688 status_t Thread::readyToRun()
693 status_t Thread::run(const char* name, int32_t priority, size_t stack)
698 // thread already started
731 // Do not refer to mStatus here: The thread is already running (may, in fact
733 // here merely indicates successfully starting the thread and does not
737 // Exiting scope of mLock is a memory barrier and allows new thread to run
740 int Thread::_threadLoop(void* user)
742 Thread* const self = static_cast<Thread*>(user);
744 sp<Thread> strong(self->mHoldSelf);
745 wp<Thread> weak(strong);
765 // (unless, of course, the thread has already been asked to exit
770 // the thread and the thread would simply disappear after the
785 // clear thread ID so that requestExitAndWait() does not exit if
786 // called by a new thread using the same thread ID as this one.
795 // Release our strong reference, to let a chance to the thread
805 void Thread::requestExit()
811 status_t Thread::requestExitAndWait()
816 "Thread (this=%p): don't call waitForExit() from this "
817 "Thread object's thread. It's a guaranteed deadlock!",
835 status_t Thread::join()
840 "Thread (this=%p): don't call join() from this "
841 "Thread object's thread. It's a guaranteed deadlock!",
854 bool Thread::isRunning() const {
860 pid_t Thread::getTid() const
869 ALOGW("Thread (this=%p): getTid() is undefined before run()", this);
876 bool Thread::exitPending() const