| /external/webrtc/webrtc/base/ |
| D | thread_unittest.cc | 17 #include "webrtc/base/thread.h" 52 Thread* post_thread, MessageHandler* phandler) in SocketClient() 77 Thread* post_thread_; 84 MessageClient(Thread* pth, Socket* socket) in MessageClient() 103 class CustomThread : public rtc::Thread { 110 return Thread::WrapCurrent(); in WrapCurrent() 113 Thread::UnwrapCurrent(); in UnwrapCurrent() 118 // A thread that does nothing when it runs and signals an event 120 class SignalWhenDestroyedThread : public Thread { 171 // Function objects to test Thread::Invoke. [all …]
|
| D | thread.cc | 11 #include "webrtc/base/thread.h" 44 Thread* Thread::Current() { in Current() 57 // maintaining thread safety using immutability within context of GCD dispatch in ThreadManager() 78 Thread *ThreadManager::CurrentThread() { in CurrentThread() 79 return static_cast<Thread *>(pthread_getspecific(key_)); in CurrentThread() 82 void ThreadManager::SetCurrentThread(Thread *thread) { in SetCurrentThread() argument 83 pthread_setspecific(key_, thread); in SetCurrentThread() 100 Thread *ThreadManager::CurrentThread() { in CurrentThread() 101 return static_cast<Thread *>(TlsGetValue(key_)); in CurrentThread() 104 void ThreadManager::SetCurrentThread(Thread *thread) { in SetCurrentThread() argument [all …]
|
| D | thread.h | 32 class Thread; variable 43 Thread* CurrentThread(); 44 void SetCurrentThread(Thread* thread); 46 // Returns a thread object with its thread_ ivar set 47 // to whatever the OS uses to represent the thread. 48 // If there already *is* a Thread object corresponding to this thread, 49 // this method will return that. Otherwise it creates a new Thread 59 Thread *WrapCurrentThread(); 76 Thread *thread; member 84 virtual void Run(Thread* thread) = 0; [all …]
|
| /external/mockito/src/main/java/org/mockito/internal/util/concurrent/ |
| D | DetachedThreadLocal.java | 9 …* A detached local that allows for explicit control of setting and removing values from a thread-l… 12 * Instances of this class are non-blocking and fully thread safe. 16 final WeakConcurrentMap<Thread, T> map; 20 case THREAD: in DetachedThreadLocal() 22 map = new WeakConcurrentMap<Thread, T>(cleaner == Cleaner.THREAD) { in DetachedThreadLocal() 24 protected T defaultValue(Thread key) { in DetachedThreadLocal() 30 map = new WeakConcurrentMap.WithInlinedExpunction<Thread, T>() { in DetachedThreadLocal() 32 protected T defaultValue(Thread key) { in DetachedThreadLocal() 43 return map.get(Thread.currentThread()); in get() 47 map.put(Thread.currentThread(), value); in set() [all …]
|
| /external/adhd/cras/src/server/ |
| D | audio_thread.h | 22 /* Hold communication pipes and pthread info for the thread used to play or 24 * to_thread_fds - Send a message from main to running thread. 25 * to_main_fds - Send a synchronous response to main from running thread. 26 * tid - Thread ID of the running playback/capture thread. 27 * started - Non-zero if the thread has started successfully. 28 * suspended - Non-zero if the thread is suspended. 30 * pollfds - What FDs wake up this thread. 48 /* Callback function to be handled in main loop in audio thread. 54 /* Creates an audio thread. 56 * A pointer to the newly created audio thread. It must be freed by calling [all …]
|
| D | audio_thread.c | 37 /* Messages that can be sent from the main context to the audio thread. */ 98 /* Audio thread logging. */ 171 /* Sends a response (error code) from the audio thread to the main thread. 172 * Indicates that the last message sent to the audio thread has been handled 175 * thread - thread responding to command. 176 * rc - Result code to send back to the main thread. 178 * The number of bytes written to the main thread. 180 static int audio_thread_send_response(struct audio_thread *thread, int rc) in audio_thread_send_response() argument 182 return write(thread->to_main_fds[1], &rc, sizeof(rc)); in audio_thread_send_response() 214 /* Reads a command from the main thread. Called from the playback/capture [all …]
|
| /external/oj-libjdwp/src/share/back/ |
| D | threadControl.c | 52 * This is a per-thread structure that is allocated on the 53 * first event that occurs in a thread. It is freed after the 54 * thread's thread end event has completed processing. The 55 * structure contains state information on its thread including 57 * per-thread state such as the current method invocation or 65 jthread thread; member 77 jint resumeFrameDepth; /* !=0 => This thread is in a call to Thread.resume() */ 86 struct ThreadList *list; /* Tells us what list this thread is in */ 101 * popFrameProceedLock is used to assure that the event thread is 112 static jvmtiError threadControl_removeDebugThread(jthread thread); [all …]
|
| D | ThreadReferenceImpl.c | 38 jthread thread; in name() local 42 thread = inStream_readThreadRef(env, in); in name() 47 if (threadControl_isDebugThread(thread)) { in name() 60 (gdata->jvmti, thread, &info); in name() 80 jthread thread; in suspend() local 82 thread = inStream_readThreadRef(getEnv(), in); in suspend() 87 if (threadControl_isDebugThread(thread)) { in suspend() 91 error = threadControl_suspendThread(thread, JNI_FALSE); in suspend() 102 jthread thread; in resume() local 104 thread = inStream_readThreadRef(getEnv(), in); in resume() [all …]
|
| /external/guava/guava-tests/test/com/google/common/util/concurrent/ |
| D | ThreadFactoryBuilderTest.java | 25 import java.lang.Thread.UncaughtExceptionHandler; 44 @Override public void uncaughtException(Thread t, Throwable e) { 58 Thread thread = threadFactory.newThread(monitoredRunnable); in testThreadFactoryBuilder_defaults() local 59 checkThreadPoolName(thread, 1); in testThreadFactoryBuilder_defaults() 61 Thread defaultThread = in testThreadFactoryBuilder_defaults() 63 assertEquals(defaultThread.isDaemon(), thread.isDaemon()); in testThreadFactoryBuilder_defaults() 64 assertEquals(defaultThread.getPriority(), thread.getPriority()); in testThreadFactoryBuilder_defaults() 65 assertSame(defaultThread.getThreadGroup(), thread.getThreadGroup()); in testThreadFactoryBuilder_defaults() 67 thread.getUncaughtExceptionHandler()); in testThreadFactoryBuilder_defaults() 70 thread.start(); in testThreadFactoryBuilder_defaults() [all …]
|
| /external/libchrome/base/threading/ |
| D | platform_thread_unittest.cc | 22 // Trivial tests that thread runs and doesn't crash on create, join, or detach - 44 TrivialThread thread; in TEST() local 47 ASSERT_FALSE(thread.run_event().IsSignaled()); in TEST() 48 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); in TEST() 50 ASSERT_TRUE(thread.run_event().IsSignaled()); in TEST() 54 TrivialThread thread[10]; in TEST() local 55 PlatformThreadHandle handle[arraysize(thread)]; in TEST() 57 for (size_t n = 0; n < arraysize(thread); n++) in TEST() 58 ASSERT_FALSE(thread[n].run_event().IsSignaled()); in TEST() 59 for (size_t n = 0; n < arraysize(thread); n++) in TEST() [all …]
|
| D | thread.h | 31 // IMPORTANT: Instead of creating a base::Thread, consider using 34 // A simple thread abstraction that establishes a MessageLoop on a new thread. 35 // The consumer uses the MessageLoop of the thread to cause code to execute on 36 // the thread. When this object is destroyed the thread is terminated. All 37 // pending tasks queued on the thread's message loop will run to completion 38 // before the thread is terminated. 40 // WARNING! SUBCLASSES MUST CALL Stop() IN THEIR DESTRUCTORS! See ~Thread(). 42 // After the thread is stopped, the destruction sequence is: 44 // (1) Thread::CleanUp() 48 // This API is not thread-safe: unless indicated otherwise its methods are only [all …]
|
| D | simple_thread.h | 5 // WARNING: You should probably be using Thread (thread.h) instead. Thread is 6 // Chrome's message-loop based Thread abstraction, and if you are a 7 // thread running in the browser, there will likely be assumptions 8 // that your thread will have an associated message loop. 10 // This is a simple thread interface that backs to a native operating system 11 // thread. You should use this only when you want a thread that does not have 15 // a new thread, and execute the Delegate's virtual Run() in this new thread 16 // until it has completed, exiting the thread. 18 // NOTE: You *MUST* call Join on the thread to clean up the underlying thread 21 // Start() having been called (and a thread never created). The Delegate [all …]
|
| /external/chromium-trace/catapult/devil/devil/utils/ |
| D | reraiser_thread.py | 5 """Thread and ThreadGroup that reraise exceptions on the main thread.""" 22 def LogThreadStack(thread, error_log_func=logging.critical): argument 23 """Log the stack for the given thread. 26 thread: a threading.Thread instance. 29 stack = sys._current_frames()[thread.ident] 31 error_log_func('Stack dump for thread %r', thread.name) 40 class ReraiserThread(threading.Thread): 41 """Thread class that can reraise exceptions.""" 44 """Initialize thread. 47 func: callable to call on a new thread. [all …]
|
| /external/deqp/framework/delibs/dethread/unix/ |
| D | deThreadUnix.c | 2 * drawElements Thread Library 21 * \brief Unix implementation of thread management. 53 pthread_t thread; member 56 } Thread; typedef 58 DE_STATIC_ASSERT(sizeof(deThread) >= sizeof(Thread*)); 62 Thread* thread = (Thread*)entryPtr; in startThread() local 63 deThreadFunc func = thread->func; in startThread() 64 void* arg = thread->arg; in startThread() 66 /* Start actual thread. */ in startThread() 75 Thread* thread = (Thread*)deCalloc(sizeof(Thread)); in deThread_create() local [all …]
|
| /external/python/cpython3/Lib/ |
| D | _threading_local.py | 1 """Thread-local objects. 8 Thread-local objects support the management of thread-local data. 9 If you have data that you want to be local to a thread, simply create 10 a thread-local object and use its attributes: 26 What's important about thread-local objects is that their data are 27 local to a thread. If we access the data in a different thread: 37 >>> thread = threading.Thread(target=f) 38 >>> thread.start() 39 >>> thread.join() 43 we get different data. Furthermore, changes made in the other thread [all …]
|
| /external/pdfium/third_party/libopenjpeg20/ |
| D | thread.h | 38 @file thread.h 39 @brief Thread API 41 The functions in thread.c have for goal to manage mutex, conditions, thread 42 creation and thread pools that accept jobs. 45 /** @defgroup THREAD THREAD - Mutex, conditions, threads and thread pools */ 56 * is built without thread support) 85 * is built without thread support) 99 * Waiting thread : 109 * Signaling thread : 123 * One of the thread waiting with opj_cond_wait() will be waken up. [all …]
|
| /external/python/cpython3/Doc/library/ |
| D | threading.rst | 1 :mod:`threading` --- Thread-based parallelism 5 :synopsis: Thread-based parallelism. 29 Return the number of :class:`Thread` objects currently alive. The returned 35 Return the current :class:`Thread` object, corresponding to the caller's thread 36 of control. If the caller's thread of control was not created through the 37 :mod:`threading` module, a dummy thread object with limited functionality is 43 Return the 'thread identifier' of the current thread. This is a nonzero 45 to be used e.g. to index a dictionary of thread-specific data. Thread 46 identifiers may be recycled when a thread exits and another thread is 54 Return a list of all :class:`Thread` objects currently alive. The list [all …]
|
| /external/elfutils/libdwfl/ |
| D | dwfl_frame.c | 49 Ebl *ebl = state->thread->process->ebl; in state_fetch_pc() 76 Dwfl_Thread *thread = state->thread; in state_free() local 77 assert (thread->unwound == state); in state_free() 78 thread->unwound = state->unwound; in state_free() 83 thread_free_all_states (Dwfl_Thread *thread) in thread_free_all_states() argument 85 while (thread->unwound) in thread_free_all_states() 86 state_free (thread->unwound); in thread_free_all_states() 90 state_alloc (Dwfl_Thread *thread) in state_alloc() argument 92 assert (thread->unwound == NULL); in state_alloc() 93 Ebl *ebl = thread->process->ebl; in state_alloc() [all …]
|
| /external/python/cpython2/Lib/test/ |
| D | test_threading.py | 10 thread = test.test_support.import_module('thread') variable 35 class TestThread(threading.Thread): 37 threading.Thread.__init__(self, name=name) 93 t = TestThread("<thread %d>"%i, self, sema, mutex, numrunning) 112 # The ident still must work for the main thread and dummy threads. 119 thread.start_new_thread(f, ()) 125 # run with a small(ish) thread stack size (256kB) 128 print 'with 256kB thread stack size...' 131 except thread.error: 132 self.skipTest('platform does not support changing thread stack size') [all …]
|
| /external/nist-sip/java/gov/nist/core/ |
| D | ThreadAuditor.java | 6 * Thread Auditor class: 15 * the thread can periodically ping the auditor. 25 private Map<Thread,ThreadHandle> threadHandles = new HashMap<Thread,ThreadHandle>(); 32 /// Set to true when the thread pings, periodically reset to false by the auditor 35 /// Thread being monitored 36 private Thread thread; field in ThreadAuditor.ThreadHandle 38 /// Thread auditor monitoring this thread 44 thread = Thread.currentThread(); in ThreadHandle() 48 /// Called by the auditor thread to check the ping status of the thread 53 /// Called by the auditor thread to reset the ping status of the thread [all …]
|
| /external/oj-libjdwp/src/share/classes/com/sun/jdi/ |
| D | ThreadReference.java | 30 * A thread object from the target VM. 32 * access to thread-specific information from the target VM. 41 /** Thread status is unknown */ 43 /** Thread has completed execution */ 45 /** Thread is runnable */ 47 /** Thread is sleeping - Thread.sleep() or JVM_Sleep() was called */ 49 /** Thread is waiting on a java monitor */ 51 /** Thread is waiting - Object.wait() or JVM_MonitorWait() was called */ 53 /** Thread has not yet been started */ 57 * Returns the name of this thread. [all …]
|
| /external/libcxx/include/ |
| D | thread | 2 //===--------------------------- thread -----------------------------------===// 16 thread synopsis 23 class thread 29 thread() noexcept; 30 template <class F, class ...Args> explicit thread(F&& f, Args&&... args); 31 ~thread(); 33 thread(const thread&) = delete; 34 thread(thread&& t) noexcept; 36 thread& operator=(const thread&) = delete; 37 thread& operator=(thread&& t) noexcept; [all …]
|
| /external/python/cpython2/Doc/library/ |
| D | threading.rst | 12 level :mod:`thread` module. 16 :mod:`threading` cannot be used because :mod:`thread` is missing. 29 Starting with Python 2.5, several Thread methods raise :exc:`RuntimeError` 34 In CPython, due to the :term:`Global Interpreter Lock`, only one thread 48 Return the number of :class:`Thread` objects currently alive. The returned 60 thread. 68 Return the current :class:`Thread` object, corresponding to the caller's thread 69 of control. If the caller's thread of control was not created through the 70 :mod:`threading` module, a dummy thread object with limited functionality is 79 Return a list of all :class:`Thread` objects currently alive. The list [all …]
|
| /external/guice/core/src/com/google/inject/internal/ |
| D | CycleDetectingLock.java | 28 * heavy IDs. Lock is referenced by a lock factory as long as it's owned by a thread. 40 * ordered by dependency cycle and lists locks for each thread that are part of the loop in order, 41 * the last lock in the list is the one that the thread is currently waiting for. Returned map is 47 ListMultimap<Thread, ID> lockOrDetectPotentialLocksCycle(); in lockOrDetectPotentialLocksCycle() 57 * <p>Important to note that we do not prevent deadlocks in the client code. As an example: Thread 59 * thread B is creating class CB and is waiting on the lock L. Issue happens due to client code 68 * Specifies lock that thread is currently waiting on to own it. Used only for purposes of locks 72 * <li>Key: thread 84 private static Map<Thread, ReentrantCycleDetectingLock<?>> lockThreadIsWaitingOn = 88 * Lists locks that thread owns. Used only to populate locks in a potential cycle when it is [all …]
|
| /external/grpc-grpc/src/core/lib/gprpp/ |
| D | thd.h | 22 /** Internal thread interface. */ 37 /// Base class for platform-specific thread-state 48 class Thread { 51 /// Does not produce a validly-constructed thread; must later 52 /// use placement new to construct a real thread. Does not init mu_ and cv_ 53 Thread() : state_(FAKE), impl_(nullptr) {} in Thread() function 55 /// Normal constructor to create a thread with name \a thd_name, 56 /// which will execute a thread based on function \a thd_body 58 /// The optional \a success argument indicates whether the thread 60 Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg, [all …]
|