Home
last modified time | relevance | path

Searched refs:threads (Results 1 – 20 of 20) sorted by relevance

/libuv/test/
H A Dtest-thread-affinity.c57 uv_thread_t threads[3]; in TEST_IMPL() local
61 threads[0] = GetCurrentThread(); in TEST_IMPL()
63 threads[0] = uv_thread_self(); in TEST_IMPL()
71 r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); in TEST_IMPL()
103 ASSERT_OK(uv_thread_create(threads + 1, in TEST_IMPL()
106 ASSERT_OK(uv_thread_create(threads + 2, in TEST_IMPL()
109 ASSERT_OK(uv_thread_join(threads + 1)); in TEST_IMPL()
110 ASSERT_OK(uv_thread_join(threads + 2)); in TEST_IMPL()
127 r = uv_thread_setaffinity(&threads[0], cpumask, NULL, cpumasksize); in TEST_IMPL()
131 r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); in TEST_IMPL()
H A Dtest-thread.c171 struct test_thread threads[8]; in TEST_IMPL() local
175 memset(threads, 0, sizeof(threads)); in TEST_IMPL()
177 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
178 r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); in TEST_IMPL()
182 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
185 ASSERT_EQ(1, threads[i].thread_called); in TEST_IMPL()
203 uv_thread_t threads[2]; in TEST_IMPL() local
208 ASSERT_OK(uv_thread_create(threads + 0, tls_thread, threads + 0)); in TEST_IMPL()
209 ASSERT_OK(uv_thread_create(threads + 1, tls_thread, threads + 1)); in TEST_IMPL()
210 ASSERT_OK(uv_thread_join(threads + 0)); in TEST_IMPL()
[all …]
H A Dbenchmark-async.c77 struct ctx* threads; in test_async() local
82 threads = calloc(nthreads, sizeof(threads[0])); in test_async()
83 ASSERT_NOT_NULL(threads); in test_async()
86 ctx = threads + i; in test_async()
101 ASSERT_OK(uv_thread_join(&threads[i].thread)); in test_async()
106 ctx = threads + i; in test_async()
118 free(threads); in test_async()
H A Dtest-thread-equal.c39 uv_thread_t threads[2]; in TEST_IMPL() local
45 ASSERT_OK(uv_thread_create(threads + 0, check_thread, subthreads + 0)); in TEST_IMPL()
46 ASSERT_OK(uv_thread_create(threads + 1, check_thread, subthreads + 1)); in TEST_IMPL()
47 ASSERT_OK(uv_thread_join(threads + 0)); in TEST_IMPL()
48 ASSERT_OK(uv_thread_join(threads + 1)); in TEST_IMPL()
H A Dtest-barrier.c132 uv_thread_t threads[4]; in TEST_IMPL() local
136 ASSERT_OK(uv_barrier_init(&barrier, ARRAY_SIZE(threads) + 1)); in TEST_IMPL()
138 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
139 ASSERT_OK(uv_thread_create(&threads[i], serial_worker, &barrier)); in TEST_IMPL()
146 for (i = 0; i < ARRAY_SIZE(threads); ++i) in TEST_IMPL()
147 ASSERT_OK(uv_thread_join(&threads[i])); in TEST_IMPL()
H A Dtest-metrics.c112 uv_thread_t threads[5]; in TEST_IMPL() local
116 ASSERT_OK(uv_thread_create(&threads[i], metrics_routine_cb, NULL)); in TEST_IMPL()
120 uv_thread_join(&threads[i]); in TEST_IMPL()
/libuv/docs/code/locks/
H A Dmain.c44 uv_thread_t threads[3]; in main() local
47 uv_thread_create(&threads[0], reader, &thread_nums[0]); in main()
48 uv_thread_create(&threads[1], reader, &thread_nums[1]); in main()
50 uv_thread_create(&threads[2], writer, &thread_nums[2]); in main()
/libuv/src/
H A Dthreadpool.c38 static uv_thread_t* threads; variable
179 if (uv_thread_join(threads + i)) in uv__threadpool_cleanup()
182 if (threads != default_threads) in uv__threadpool_cleanup()
183 uv__free(threads); in uv__threadpool_cleanup()
188 threads = NULL; in uv__threadpool_cleanup()
208 threads = default_threads; in init_threads()
210 threads = uv__malloc(nthreads * sizeof(threads[0])); in init_threads()
211 if (threads == NULL) { in init_threads()
213 threads = default_threads; in init_threads()
234 if (uv_thread_create_ex(threads + i, &config, worker, &sem)) in init_threads()
/libuv/m4/
H A Dax_pthread.m411 # This macro figures out how to build C programs using POSIX threads. It
12 # sets the PTHREAD_LIBS output variable to the threads library and linker
40 # ACTION-IF-FOUND is a list of shell commands to run if a threads library
100 # etcetera environment variables, and if threads linking works using
121 # We must check for the threads library under a number of different
137 # none: in case threads are in libc; should be tried before -Kthread and
139 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
140 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
143 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
259 # to get POSIX threads support; the API is always present and
[all …]
/libuv/docs/src/
H A Dthreadpool.rst17 .. versionchanged:: 1.45.0 threads now have an 8 MB stack instead of the
22 libuv preallocates and initializes the maximum number of threads allowed by
24 (~1MB for 128 threads) but increases the performance of threading at runtime.
H A Dguide.rst18 guide/threads
H A Dmigration_010_100.rst78 In libuv 0.10 Unix used a threadpool which defaulted to 4 threads, while Windows used the
80 threads per process.
H A Dtcp.rst31 * or threads if they all set SO_REUSEPORT before binding the port.
124 connections across all listening sockets in multiple processes or threads.
H A Dsignal.rst53 manage threads. Installing watchers for those signals will lead to unpredictable behavior
H A Dudp.rst41 * SO_REUSEADDR flag. What that means is that multiple threads or
69 * Unlike UV_UDP_REUSEADDR, this flag will make multiple threads or
72 * the receiving sockets among threads or processes.
H A Dmisc.rst397 are available for threads or child processes.
/libuv/docs/src/guide/
H A Dthreads.rst4 Wait a minute? Why are we on threads? Aren't event loops supposed to be **the
10 calls. libuv also uses threads to allow you, the application, to perform a task
14 Today there are two predominant thread libraries: the Windows threads
20 loop and callback principles, threads are complete agnostic, they block as
26 threads are different on all platforms, with different levels of completeness.
71 This section is purposely spartan. This book is not about threads, so I only
152 threads can attempt to call ``uv_once()`` with a given guard and a function
176 /* ... spawn threads */
179 After all threads are done, ``i == 1``.
201 a routine which performs I/O under the hood) to be used with threads if you
[all …]
H A Dbasics.rst43 One of the standard solutions is to use threads. Each blocking I/O operation is
66 processor, libuv and OSes will usually run background/worker threads and/or
H A Dprocesses.rst11 may also be easier to reason about compared to one with threads and shared
16 the kernel can perform scheduling and assign different threads to different
/libuv/
H A DChangeLog569 * unix,win: give thread pool threads an 8 MB stack (Ben Noordhuis)
1124 * thread: initialize uv_thread_self for all threads (Jameson Nash)
2887 * unix,win: wait for threads to start (Ben Noordhuis)
2937 * Revert "unix,win: wait for threads to start" (Ben Noordhuis)
2966 * unix,win: wait for threads to start (Ben Noordhuis)
4254 * test,unix: reduce stack size of watchdog threads (Ben Noordhuis)

Completed in 53 milliseconds