| /freebsd/contrib/netbsd-tests/lib/libpthread_dbg/ | 
| H A D | t_threads.c | 78 	pthread_t threads[MAX_THREADS];  in ATF_TC_BODY()  local 90 		    (pthread_create(&threads[i], NULL, busyFunction1, NULL));  in ATF_TC_BODY() 139 	pthread_t threads[MAX_THREADS];  in ATF_TC_BODY()  local 153 		    (pthread_create(&threads[i], NULL, busyFunction2, NULL));  in ATF_TC_BODY() 167 	    "counted threads (%d) != expected threads (%zu)",  in ATF_TC_BODY() 209 	pthread_t threads[MAX_THREADS];  in ATF_TC_BODY()  local 223 		    (pthread_create(&threads[i], NULL, busyFunction3, NULL));  in ATF_TC_BODY() 237 	    "counted threads (%d) != expected threads (%zu)",  in ATF_TC_BODY() 282 	pthread_t threads[MAX_THREADS];  in ATF_TC_BODY()  local 295 		    (pthread_create(&threads[i], NULL, busyFunction4, NULL));  in ATF_TC_BODY() [all …] 
 | 
| /freebsd/crypto/openssl/test/recipes/30-test_evp_data/ | 
| H A D | evpkdf_argon2.txt | 85 Threads = 2 86 Ctrl.threads = threads:2 94 Threads = 2 95 Ctrl.threads = threads:2 120 # Expected fail on condition violation: threads > avail threads 123 Ctrl.threads = threads:2 140 # Expected fail on condition violation: threads >= 1 142 Ctrl.lanes = threads:0 145 # Expected fail on condition violation: threads <= 0xFFFFFF 147 Ctrl.lanes = threads:0x1000000
  | 
| /freebsd/sys/contrib/openzfs/man/man4/ | 
| H A D | spl.4 | 29 The number of threads created for the spl_kmem_cache task queue. 32 For the majority of systems and workloads only a small number of threads are 134 Kick stuck taskq to spawn threads. 137 it will kick it to spawn more threads. 142 Bind taskq threads to specific CPUs. 143 When enabled all taskq threads will be distributed evenly 153 New threads will be created on demand up to a maximum allowed number 155 Threads which are no longer needed will be promptly destroyed. 160 Allow newly created taskq threads to set a non-default scheduler priority. 162 to all threads created by that taskq. [all …] 
 | 
| /freebsd/share/man/man9/ | 
| H A D | kern_yield.9 | 73 context switch that yielding would be a useful service to other threads. 93 high-priority realtime or interrupt threads. 94 Kernel worker threads and timesharing threads are not guaranteed to preempt 96 Thus, threads executing in the kernel are expected to behave cooperatively 97 with respect to other threads in the system. 98 The yield functions are mostly intended to be used by threads which perform a 106 The scheduler aims to identify threads which monopolize the CPU, and will 108 Threads which regularly yield the processor will be given the chance to run 111 other threads on the CPU's runqueue, a call to 124 Otherwise, threads which have been given the chance to run could end up waiting
  | 
| /freebsd/contrib/xz/src/liblzma/common/ | 
| H A D | stream_encoder_mt.c | 67 	/// thread back to the stack of free threads. 92 	/// Next structure in the stack of free worker threads. 166 	worker_thread *threads;  member 168 	/// Number of structures in "threads" above. This is also the 169 	/// number of threads that will be created at maximum. 173 	/// thus the number of worker threads actually created so far. 176 	/// Stack of free threads. When a thread finishes, it puts itself 177 	/// back into this stack. This starts as empty because threads 400 		// where the main thread is waiting for the threads to stop.  in worker_start() 423 			// Return this thread to the stack of free threads.  in worker_start() [all …] 
 | 
| H A D | stream_decoder_mt.c | 79 	/// putting this thread back to the stack of free threads. 104 	/// happen if all worker threads were frequently locking the main 122 	/// Next structure in the stack of free worker threads. 191 	/// Number of threads that will be created at maximum. 195 	/// "threads", and thus the number of worker threads actually 199 	/// Array of allocated thread-specific structures. When no threads 202 	struct worker_thread *threads;  member 204 	/// Stack of free threads. When a thread finishes, it puts itself 205 	/// back into this stack. This starts as empty because threads 215 	/// Output buffer queue for decompressed data from the worker threads [all …] 
 | 
| /freebsd/contrib/llvm-project/lldb/source/Plugins/Trace/intel-pt/ | 
| H A D | TraceIntelPTBundleLoader.cpp | 128   for (const JSONThread &thread : process.threads) in ParseProcess()  129     parsed_process->threads.push_back(ParseThread(*process_sp, thread)); in ParseProcess()  135   if (!process.threads.empty()) in ParseProcess()  139   // its threads. in ParseProcess()  157   // Add cpus as fake threads in ParseKernel()  163     parsed_process->threads.push_back(thread_sp); in ParseKernel()  190   // its threads. in ParseKernel()  249       "threads": [ in GetSchema()  250           // A list of known threads for the given process. When context switch in GetSchema()  251           // data is provided, LLDB will automatically create threads fo in GetSchema()  371 std::vector<ThreadPostMortemTraceSP> threads; CreateTraceIntelPTInstance()  local  [all...] | 
| /freebsd/sys/contrib/zstd/lib/common/ | 
| H A D | pool.c | 36     /* Keep track of the threads */ 37     ZSTD_pthread_t* threads;  member 47     /* The number of threads working on jobs */ 78                  * a few threads will be shutdown while !queueEmpty,  in POOL_thread() 79                  * but enough threads will remain active to finish the queue */  in POOL_thread() 145 … ctx->threads = (ZSTD_pthread_t*)ZSTD_customMalloc(numThreads * sizeof(ZSTD_pthread_t), customMem);  in POOL_create_advanced() 149     if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; }  in POOL_create_advanced() 150     /* Initialize the threads */  in POOL_create_advanced() 153             if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) {  in POOL_create_advanced() 165     Shutdown the queue, wake any sleeping threads, and join all of the threads. [all …] 
 | 
| /freebsd/sys/contrib/openzfs/module/zstd/lib/common/ | 
| H A D | pool.c | 37     /* Keep track of the threads */ 38     ZSTD_pthread_t* threads;  member 48     /* The number of threads working on jobs */ 79                  * a few threads will be shutdown while !queueEmpty,  in POOL_thread() 80                  * but enough threads will remain active to finish the queue */  in POOL_thread() 140     ctx->threads = (ZSTD_pthread_t*)ZSTD_malloc(numThreads * sizeof(ZSTD_pthread_t), customMem);  in POOL_create_advanced() 144     if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; }  in POOL_create_advanced() 145     /* Initialize the threads */  in POOL_create_advanced() 148             if (ZSTD_pthread_create(&ctx->threads[i], NULL, &POOL_thread, ctx)) {  in POOL_create_advanced() 160     Shutdown the queue, wake any sleeping threads, and join all of the threads. [all …] 
 | 
| /freebsd/contrib/netbsd-tests/lib/libc/stdlib/ | 
| H A D | t_getenv_thread.c | 144 	atf_tc_set_md_var(tc, "descr", "Test getenv_r(3) with threads");  in ATF_TC_HEAD() 150 	pthread_t threads[THREADED_NUM_THREADS];  in ATF_TC_BODY()  local 158 		ATF_CHECK(pthread_create(&threads[i++], NULL, thread_getenv_r,  in ATF_TC_BODY() 163 		ATF_CHECK(pthread_join(threads[j], NULL) == 0);  in ATF_TC_BODY() 175 	pthread_t threads[THREADED_NUM_THREADS];  in ATF_TC_BODY()  local 183 		ATF_CHECK(pthread_create(&threads[i++], NULL, thread_putenv,  in ATF_TC_BODY() 188 		ATF_CHECK(pthread_join(threads[j], NULL) == 0);  in ATF_TC_BODY() 200 	pthread_t threads[THREADED_NUM_THREADS];  in ATF_TC_BODY()  local 208 		ATF_CHECK(pthread_create(&threads[i++], NULL, thread_setenv,  in ATF_TC_BODY() 213 		ATF_CHECK(pthread_join(threads[j], NULL) == 0);  in ATF_TC_BODY() [all …] 
 | 
| /freebsd/contrib/ofed/opensm/include/complib/ | 
| H A D | cl_threadpool.h | 62 *	The Thread Pool manages a user specified number of threads. 65 *	invoking a user specified callback function. All threads in the thread 112 *		Number of threads running. 135 *	The cl_thread_pool_init function creates the threads to be 151 *		[in] Number of threads to be managed by the thread pool. 162 *		[in] Name to associate with the threads.  The name may be up to 16 163 *		characters, including a terminating null character.  All threads 172 *	CL_ERROR if the threads could not be created. 175 *	cl_thread_pool_init creates and starts the specified number of threads. 176 *	If thread_count is zero, the thread pool creates as many threads as there [all …] 
 | 
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/perf/ | 
| H A D | perf.shlib | 45 	typeset threads=$1 53 	suffix="$suffix.$threads-threads.$filesystems-filesystems" 63 	typeset threads=$4 69 	log_note "Running with $threads $sync_str threads, $iosize ios" 73 		verify_threads_per_fs "$threads" "$threads_per_fs" 82 		# of the number of threads. 85 			populate_perf_filesystems $((threads / threads_per_fs)) 114 	export FILESIZE=$((TOTAL_SIZE / threads)) 115 	export NUMJOBS=$threads 131 	typeset suffix=$(get_suffix "$threads" "$sync" "$iosize") [all …] 
 | 
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ | 
| H A D | ThreadPool.h | 36 /// asynchronous parallel execution on a defined number of threads. 43 /// It is also possible for worker threads to submit new tasks and wait for 46 /// available threads are used up by tasks waiting for a task that has no thread 60   /// Blocking wait for all the threads to complete and the queue to be empty. 65   /// Blocking wait for only all the threads in the given group to complete. 120 /// A ThreadPool implementation using std::threads. 122 /// The pool keeps a vector of threads alive, waiting on a condition variable 127   /// execution resources (threads, cores, CPUs) 132   /// Blocking destructor: the pool will wait for all the threads to complete. 135   /// Blocking wait for all the threads to complete and the queue to be empty. [all …] 
 | 
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ | 
| H A D | sanitizer_stoptheworld_win.cpp | 93     // Take a snapshot of all Threads  in RunThread() 94     const HANDLE threads = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);  in RunThread()  local 95     CHECK(threads != INVALID_HANDLE_VALUE);  in RunThread() 101     if (!Thread32First(threads, &thread_entry))  in RunThread() 136     } while (Thread32Next(threads, &thread_entry));  in RunThread() 138     CloseHandle(threads);  in RunThread() 141     // relevant Threads, new Threads could have potentially been created. So  in RunThread() 142     // continue to find and suspend new Threads until we don't find any.  in RunThread() 145   // Now all Threads of this Process except of this Thread should be suspended.  in RunThread() 149   // Resume all Threads  in RunThread()
  | 
| /freebsd/contrib/llvm-project/lldb/source/Target/ | 
| H A D | ThreadList.cpp | 230   // The ShouldStop method of the threads can do a whole lot of work, figuring  in ShouldStop() 233   // FIXME: It is possible that running code could cause new threads  in ShouldStop() 236   // any interesting operations on those threads yet.  in ShouldStop() 261     // It is possible the threads we were allowing to run all exited and then  in ShouldStop() 263     // all threads:  in ShouldStop() 274               "ThreadList::%s: %" PRIu64 " threads, %" PRIu64  in ShouldStop() 275               " unsuspended threads",  in ShouldStop() 293   // Now we run through all the threads and get their stop info's.  We want to  in ShouldStop() 319     // and a bunch of threads hit the breakpoint, but not the thread which we  in ShouldStop() 320     // are waiting for.  All the threads that are not "supposed" to hit the  in ShouldStop() [all …] 
 | 
| /freebsd/contrib/llvm-project/compiler-rt/lib/tsan/benchmarks/ | 
| H A D | vts_many_threads_bench.cpp | 3 // 1) Spawn M + N threads (M >> N) 4 //    We'll call the 'M' threads as 'garbage threads'. 5 // 2) Make sure all threads have created thus no TIDs were reused 6 // 3) Join the garbage threads 7 // 4) Do many sync operations on the remaining N threads 58   // Wait for the main thread to join the garbage threads.  in Thread() 105     printf("All threads started! Killing the garbage threads.\n");  in main() 111   printf("Resuming the main threads.\n");  in main()
  | 
| /freebsd/crypto/openssl/doc/designs/ | 
| H A D | thread-api.md | 4 OpenSSL wishes to support the internal use of threads for purposes of 24 In the default model, OpenSSL creates and manages threads up to a maximum 25 number of threads authorized by the application. 32  * Set the maximum number of threads to be used by the thread pool. 35  * threads and existing threads in the thread pool will be torn down. 45  * Get the maximum number of threads currently allowed to be used by the 51 The maximum thread count is a limit, not a target. Threads will not be spawned 59 These functions allow the caller to determine if OpenSSL was built with threads
  | 
| /freebsd/share/man/man3/ | 
| H A D | pthread_barrier_destroy.3 | 51 The number of threads that must call 53 before any of the waiting threads can be 64 function will synchronize calling threads at 66 The threads will be blocked from 68 a sufficient number of threads calls this function. 69 The number of threads that must call it before 74 Once the threads have been released the barrier will be reset. 92 is successful, all but one of the threads will return zero.
  | 
| /freebsd/sbin/nvmecontrol/ | 
| H A D | perftest.c | 53 	uint32_t	threads;  member 62 	.threads = 0, 76 	OPT("threads", 'n', arg_uint32, opt, threads, 77 	    "Number of threads to run"), 122 	printf("Threads: %2d Size: %6d %5s Time: %3d IO/s: %7ju MB/s: %4ju\n",  in print_perftest() 160 	if (opt.threads <= 0 || opt.threads > 128) {  in perftest() 161 		fprintf(stderr, "Bad number of threads %d\n", opt.threads);  in perftest() 164 	io_test.num_threads = opt.threads;  in perftest()
  | 
| /freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ | 
| H A D | taskq.h | 86 	wmsum_t tqs_threads_active;		/* threads running a task */ 87 	wmsum_t tqs_threads_idle;		/* threads waiting for work */ 88 	wmsum_t tqs_threads_total;		/* total threads */ 96 	wmsum_t tqs_threads_created;		/* threads created */ 97 	wmsum_t tqs_threads_destroyed;		/* threads destroyed */ 114 	struct list_head	tq_thread_list;	/* list of all threads */ 115 	struct list_head	tq_active_list;	/* list of active threads */ 116 	int			tq_nactive;	/* # of active threads */ 117 	int			tq_nthreads;	/* # of existing threads */ 118 	int			tq_nspawn;	/* # of threads being spawned */ [all …] 
 | 
| /freebsd/contrib/unbound/doc/ | 
| H A D | unbound-control.8 | 60 That means the caches sizes and the number of threads must not change between 65 keep seeing service. This needs the code compiled with threads. The config 168 The '+p' option makes the reload not pause threads, they keep running. 170 for threads to see an inconsistent state with some options from the old 175 microseconds instead of 0.3 milliseconds during which the worker threads are 192 The '+d' option makes the reload drop queries that the worker threads are 336 being serviced from other threads. 658 summed over threads. 661 summed over threads. 664 summed over threads. [all …] 
 | 
| /freebsd/contrib/llvm-project/lldb/bindings/interface/ | 
| H A D | SBProcessExtensions.i | 67             '''An accessor function that returns a list() that contains all threads in a lldb.SBProcess object.''' 68             threads = [] 71                 threads.append(accessor[idx]) 72             return threads 75             '''Iterate over all threads in a lldb.SBProcess object.''' 79             '''Return the number of threads in a lldb.SBProcess object.''' 85         threads = property(get_process_thread_list, None, doc='''A read only property that returns a list() of lldb.SBThread objects for this process.''') 86         thread = property(get_threads_access_object, None, doc='''A read only property that returns an object that can access threads by thread index (thread = lldb.process.thread[12]).''') 92         num_threads = property(GetNumThreads, None, doc='''A read only property that returns the number of threads in this process as an integer.''')
  | 
| /freebsd/contrib/llvm-project/llvm/lib/Support/ | 
| H A D | ThreadPool.cpp | 40   if (Threads.size() >= MaxThreadCount)  in grow() 43   while (static_cast<int>(Threads.size()) < newThreadCount) {  in grow() 44     int ThreadID = Threads.size();  in grow() 45     Threads.emplace_back([this, ThreadID] {  in grow() 87       // Need to count active threads in each group separately, ActiveThreads  in processTasks() 128     // If this was a task in a group, notify also threads waiting for tasks  in processTasks() 146   // Wait for all threads to complete and the queue to be empty  in wait() 153   // Wait for all threads in the group to complete.  in wait() 172   for (const llvm::thread &Thread : Threads)  in isWorkerThread() 178 // The destructor joins all threads, waiting for completion. [all …] 
 | 
| /freebsd/contrib/ntp/sntp/libevent/ | 
| H A D | iocp-internal.h | 80 	/** Number of threads ever open on the port. */ 82 	/** True iff we're shutting down all the threads on this port */ 84 	/** How often the threads on this port check for shutdown and other 87 	/* The threads that are waiting for events. */ 88 	HANDLE *threads;  member 89 	/** Number of threads currently open on this port. */ 161 /** Create an IOCP, and launch its worker threads.  Internal use only. 169     fd will happen on one of the iocp's worker threads. 175 /** Tell all threads serving an iocp to stop.  Wait for up to waitMsec for all 176     the threads to finish whatever they're doing.  If waitMsec is -1, wait [all …] 
 | 
| /freebsd/contrib/libevent/ | 
| H A D | iocp-internal.h | 80 	/** Number of threads ever open on the port. */ 82 	/** True iff we're shutting down all the threads on this port */ 84 	/** How often the threads on this port check for shutdown and other 87 	/* The threads that are waiting for events. */ 88 	HANDLE *threads;  member 89 	/** Number of threads currently open on this port. */ 161 /** Create an IOCP, and launch its worker threads.  Internal use only. 169     fd will happen on one of the iocp's worker threads. 175 /** Tell all threads serving an iocp to stop.  Wait for up to waitMsec for all 176     the threads to finish whatever they're doing.  If waitMsec is -1, wait [all …] 
 |