Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 38) sorted by relevance

12

/libuv/test/
H A Dtest-thread.c116 struct test_thread* thread = arg; in do_work() local
136 thread->thread_called = 1; in do_work()
246 uv_thread_t thread; in TEST_IMPL() local
248 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
253 uv_thread_t thread; in TEST_IMPL() local
260 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
265 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
270 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
275 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
281 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
[all …]
H A Dtest-condvar.c129 uv_thread_t thread; in TEST_IMPL() local
133 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
139 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
148 uv_thread_t thread; in TEST_IMPL() local
152 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
158 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
193 uv_thread_t thread; in TEST_IMPL() local
197 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
203 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
212 uv_thread_t thread; in TEST_IMPL() local
[all …]
H A Dtest-barrier.c50 uv_thread_t thread; in TEST_IMPL() local
57 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
62 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
72 uv_thread_t thread; in TEST_IMPL() local
80 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
84 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
94 uv_thread_t thread; in TEST_IMPL() local
102 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
107 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-semaphore.c51 uv_thread_t thread; in TEST_IMPL() local
58 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
66 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
75 uv_thread_t thread; in TEST_IMPL() local
83 ASSERT_OK(uv_thread_create(&thread, worker, &wc)); in TEST_IMPL()
87 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-async-null-cb.c29 static uv_thread_t thread; variable
58 ASSERT_OK(uv_thread_create(&thread, thread_cb, NULL)); in TEST_IMPL()
60 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-embed.c49 uv_thread_t thread; in TEST_IMPL() local
55 ASSERT_OK(uv_thread_create(&thread, thread_main, NULL)); in TEST_IMPL()
74 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-eintr-handling.c66 uv_thread_t thread; in TEST_IMPL() local
77 ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); in TEST_IMPL()
90 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-async.c27 static uv_thread_t thread; variable
102 r = uv_thread_create(&thread, thread_cb, NULL); in prepare_cb()
130 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dtest-pipe-set-non-blocking.c70 uv_thread_t thread; in TEST_IMPL() local
88 ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); in TEST_IMPL()
120 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
H A Dbenchmark-async.c32 uv_thread_t thread; member
93 ASSERT_OK(uv_thread_create(&ctx->thread, worker, ctx)); in test_async()
101 ASSERT_OK(uv_thread_join(&threads[i].thread)); in test_async()
H A Dtest-mutexes.c140 uv_thread_t thread; in TEST_IMPL() local
147 ASSERT_OK(uv_thread_create(&thread, thread_rwlock_trylock_peer, NULL)); in TEST_IMPL()
175 ASSERT_OK(uv_thread_join(&thread)); in TEST_IMPL()
/libuv/docs/src/guide/
H A Dthreads.rst29 running in one thread (the main thread)**. No other thread interacts
32 Core thread operations
40 .. rubric:: thread-create/main.c
41 .. literalinclude:: ../../code/thread-create/main.c
57 .. rubric:: thread-create/main.c
184 thread-local storage.
233 The thread function will be launched in a separate thread, passed the
290 .. _inter-thread-communication:
292 Inter-thread communication
308 The async thread communication works *on loops* so although any thread can be
[all …]
H A Dbasics.rst44 started in a separate thread (or in a thread pool). When the blocking function
45 gets invoked in the thread, the operating system can schedule another thread to run,
65 way our computer hardware works, with the thread as the basic unit of the
/libuv/docs/src/
H A Dthreadpool.rst8 in the loop thread. This thread pool is internally used to run all file system
27 Note that even though a global thread pool which is shared across all events
28 loops is used, the functions are not thread safe.
40 Callback passed to :c:func:`uv_queue_work` which will be run on the thread
46 thread after the work on the threadpool has been completed. If the work
66 Initializes a work request which will run the given `work_cb` in a thread
68 called on the loop thread.
H A Dthreading.rst20 Callback that is invoked to initialize thread execution. `arg` is the same
60 Options for spawning a new thread (passed to :c:func:`uv_thread_create_ex`).
83 Like :c:func:`uv_thread_create`, but additionally specifies options for creating a new thread.
85 If `UV_THREAD_HAS_STACK_SIZE` is set, `stack_size` specifies a stack size for the new thread.
93 Sets the specified thread's affinity to cpumask, which is specified in
111 Gets the specified thread's affinity setting. On Unix, this maps the
124 Gets the CPU number on which the calling thread is running.
138 Sets the scheduling priority of the thread specified by tid. It requires elevated
146 Retrieves the scheduling priority of the thread specified by tid. The value in the
154 The total thread-local storage size may be limited. That is, it may not be possible to
[all …]
H A Ddesign.rst44 operations, and it's meant to be tied to a single thread. One can run multiple event loops
45 as long as each runs in a different thread. The libuv event loop (or any other API involving
46 the loop or handles, for that matter) **is not thread-safe** except where stated otherwise.
115 libuv uses a thread pool to make asynchronous file I/O operations possible, but
116 network I/O is **always** performed in a single thread, each loop's thread.
127 so the current approach is to run blocking file I/O operations in a thread pool.
132 libuv currently uses a global thread pool on which all loops can queue work. 3 types of
140 See the :c:ref:`threadpool` section for more details, but keep in mind the thread pool size
H A Dasync.rst8 called from another thread.
50 It's safe to call this function from any thread. The callback will be called on the
51 loop thread.
H A Dmisc.rst274 .. warning:: Allocator must be thread-safe.
327 .. versionchanged:: 1.18.1 now thread-safe on all supported platforms.
342 .. versionchanged:: 1.18.1 now thread-safe on all supported platforms.
405 Returns the maximum size of the mask used for process/thread affinities,
548 `uv_os_homedir()` is not thread safe.
565 `uv_os_tmpdir()` is not thread safe.
722 This function is not thread safe.
744 This function is not thread safe.
754 This function is not thread safe.
764 This function is not thread safe.
[all …]
H A Dmetrics.rst54 event provider (e.g. ``epoll_wait``). The call is thread safe.
/libuv/src/win/
H A Dthread.c104 HANDLE thread; in uv_thread_create_ex() local
131 thread = (HANDLE) _beginthreadex(NULL, in uv_thread_create_ex()
137 if (thread == NULL) { in uv_thread_create_ex()
142 *tid = thread; in uv_thread_create_ex()
143 ctx->self = thread; in uv_thread_create_ex()
144 ResumeThread(thread); in uv_thread_create_ex()
H A Dpipe.c1017 HANDLE thread; in uv__pipe_interrupt_read() local
1022 thread = *thread_ptr; in uv__pipe_interrupt_read()
1023 if (thread == NULL) { in uv__pipe_interrupt_read()
1031 while (thread != INVALID_HANDLE_VALUE) { in uv__pipe_interrupt_read()
1032 r = CancelSynchronousIo(thread); in uv__pipe_interrupt_read()
1035 thread = *thread_ptr; in uv__pipe_interrupt_read()
1248 HANDLE thread; in uv_pipe_zero_readfile_thread_proc() local
1261 &thread, in uv_pipe_zero_readfile_thread_proc()
1277 *thread_ptr = thread; in uv_pipe_zero_readfile_thread_proc()
1290 assert(thread == *thread_ptr); in uv_pipe_zero_readfile_thread_proc()
[all …]
/libuv/src/unix/
H A Dhaiku.c96 thread_info thread; in uv_resident_set_memory() local
98 status = get_thread_info(find_thread(NULL), &thread); in uv_resident_set_memory()
104 while (get_next_area_info(thread.team, &cookie, &area) == B_OK) in uv_resident_set_memory()
/libuv/
H A DMakefile.am41 src/thread-common.c \
86 src/win/thread.c \
115 src/unix/thread.c \
294 test/test-thread-equal.c \
295 test/test-thread.c \
296 test/test-thread-affinity.c \
297 test/test-thread-priority.c \
H A DCMakeLists.txt75 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
76 …CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
77 … set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
181 src/thread-common.c
213 src/win/thread.c
252 src/unix/thread.c
517 test/benchmark-thread.c
667 test/test-thread-affinity.c
668 test/test-thread-equal.c
669 test/test-thread.c
[all …]
/libuv/docs/code/
H A DCMakeLists.txt24 thread-create

Completed in 33 milliseconds

12