/darwin-on-arm/xnu/tools/tests/execperf/ |
H A D | run.c | 22 pthread_t *threads; local 33 threads = (pthread_t *)calloc(threadcount, sizeof(pthread_t)); 35 ret = pthread_create(&threads[i], NULL, work, (void *)(intptr_t)count); 42 ret = pthread_join(threads[i], NULL);
|
/darwin-on-arm/xnu/osfmk/kern/ |
H A D | bsd_kern.c | 112 thread_t thread = (thread_t)queue_first(&task->threads); 114 if (queue_end(&task->threads, (queue_entry_t)thread)) 140 for (inc = (thread_t)queue_first(&task->threads); 141 !queue_end(&task->threads, (queue_entry_t)inc); ) { 188 for (inc = (thread_t)queue_first(&task->threads); 189 !queue_end(&task->threads, (queue_entry_t)inc); ) { 266 for (inc = (thread_t)queue_first(&task->threads); 267 !queue_end(&task->threads, (queue_entry_t)inc); inc = (thread_t)queue_next(&inc->task_threads)) 536 for (inc = (thread_t)queue_first(&task->threads); 537 !queue_end(&task->threads, (queue_entry_ [all...] |
H A D | task.c | 246 queue_iterate(&task->threads, thread, thread_t, task_threads) { 434 queue_init(&new_task->threads); 744 * Indicate that we want all the threads to stop executing 758 queue_iterate(&task->threads, thread, thread_t, task_threads) { 825 * We hold the task and mark all other threads in the task for 860 * Mark all the threads to keep them from starting any more 868 * Terminate all the other threads in the task. 870 queue_iterate(&task->threads, thread, thread_t, task_threads) { 885 * Complete task halt by waiting for threads to terminate, then clean 897 * Wait for the other threads t [all...] |
H A D | processor.c | 94 queue_head_t threads; variable 126 queue_init(&threads); 716 * newly created and assigned threads. Optionally change existing 763 * Common internals for processor_set_{threads,tasks} 840 for (thread = (thread_t)queue_first(&threads); 841 !queue_end(&threads, (queue_entry_t)thread); 842 thread = (thread_t)queue_next(&thread->threads)) { 949 * List all threads in the processor set.
|
H A D | stack.c | 495 * Return info on stack usage for threads in a specific processor set 554 for (i = 0, thread = (thread_t) queue_first(&threads); 555 !queue_end(&threads, (queue_entry_t) thread); 556 thread = (thread_t) queue_next(&thread->threads)) {
|
H A D | processor.h | 100 /* # of threads in runq bound to any processor in pset */ 123 extern queue_head_t tasks, terminated_tasks, threads; /* Terminated tasks are ONLY for stackshot */ 159 int runq_bound_count; /* # of threads bound to this processor */
|
H A D | thread.c | 160 int thread_max = CONFIG_THREAD_MAX; /* Max number of threads */ 288 "threads"); 471 * Perform final clean up for terminating threads. 508 queue_remove(&task->threads, thread, thread_t, task_threads); 521 queue_remove(&threads, thread, thread_t, threads); 730 /* New threads inherit any default state on the task */ 751 queue_enter(&parent_task->threads, new_thread, thread_t, task_threads); 754 /* So terminating threads don't need to take the task lock to decrement */ 760 queue_enter(&threads, new_threa [all...] |
H A D | task_policy.c | 312 queue_iterate(&task->threads, thread, thread_t, task_threads) { 1256 for (thread = (thread_t)queue_first(&task->threads); 1257 !queue_end(&task->threads, (queue_entry_t)thread); ) { 1393 * aggregate entity (so-called "Task-wide" or "Proc-wide" scope, whereby the CPU time consumed by all threads 1566 queue_iterate(&task->threads, thread, thread_t, task_threads) { 1639 queue_iterate(&task->threads, thread, thread_t, task_threads) {
|
H A D | task.h | 218 queue_chain_t tw_links; /* queueing of threads */ 247 queue_head_t threads; member in struct:task 261 integer_t priority; /* base priority for threads */ 262 integer_t max_priority; /* maximum priority for threads */ 269 uint64_t total_user_time; /* terminated threads only */ 343 boolean_t pidsuspended; /* pid_suspend called; no threads can execute */ 358 queue_head_t task_watchers; /* app state watcher threads */ 366 /* Statistics accumulated for terminated threads from this task */ 433 /* Hold all threads in a task */ 442 /* Release hold on all threads i [all...] |
H A D | thread.h | 62 * This file contains the structure definitions for threads. 300 * - affinity_threads links task threads with the same affinity set 340 queue_chain_t threads; /* global list of all threads */ member in struct:thread
|
/darwin-on-arm/xnu/osfmk/chud/ |
H A D | chud_thread.c | 253 for (i = 0, thread = (thread_t)queue_first(&threads); 254 !queue_end(&threads, (queue_entry_t)thread); 255 thread = (thread_t)queue_next(&thread->threads)) { 378 for (thread = (thread_t)queue_first(&task->threads); i < actual; 384 assert(queue_end(&task->threads, (queue_entry_t)thread)); 393 /* no threads, so return null pointer and deallocate memory */
|
/darwin-on-arm/xnu/tools/tests/affinity/ |
H A D | pool.c | 32 * queue and multiple threads. The first stage is the producer and subsequent 34 * and M consumer threads. The are B buffers per producer threads circulating 40 * work item, it sets its affinity to this tag. Hence consumer threads migrate 55 int threads; variable 233 if (threads_ready == threads) { 236 printf(" all threads ready for process %d, " 386 * Fire up the worker threads. 388 threads = consumers * (stages - 1) + producers; 410 worker_info = (worker_info_t *) malloc(threads * sizeo [all...] |
H A D | sets.c | 30 * We spin off sets of production line threads (2 sets by default). 31 * All threads of each line sets the same affinity tag (unless disabled). 32 * By default there are 2 stage (worker) threads per production line. 38 * Worker threads process (iterate over) 10000 buffers by default. 41 * to the set number, 1 .. N. So the threads of each set share an L2 cache. 55 int threads; variable 223 if (threads_ready == threads) { 226 printf(" all threads ready for process %d, " 407 * Fire up the worker threads. 409 threads [all...] |
/darwin-on-arm/xnu/tools/tests/zero-to-n/ |
H A D | zero-to-n.c | 245 * Wait for a wakeup, potentially wake up another of the "0-N" threads, 354 printf("Usage: zn <num threads> <chain | broadcast-single-sem | broadcast-per-thread> <realtime | timeshare | fixed> <num iterations> [-trace <traceworthy latency in ns>] [-spin] [-verbose]\n"); 397 pthread_t *threads; local 412 /* How many threads? */ 445 /* Arrays for threads and their wakeup times */ 446 threads = (pthread_t*) malloc(sizeof(pthread_t) * g_numthreads); 447 assert(threads, fail); 478 /* Create the threads */ 481 res = pthread_create(&threads[i], NULL, child_thread_func, (void*)(uintptr_t)i); 502 /* Wait for worker threads t [all...] |
/darwin-on-arm/xnu/tools/tests/libMicro/ |
H A D | README | 81 [-T threads (default 1)]
|
/darwin-on-arm/xnu/osfmk/kdp/ |
H A D | kdp.c | 1167 * Not interested in terminated tasks without threads, and 1170 if (queue_empty(&task->threads) || task_pid == -1) { 1258 queue_iterate(&task->threads, thread, thread_t, task_threads){
|
/darwin-on-arm/xnu/osfmk/pmc/ |
H A D | pmc.c | 826 * thread or system, or the threads match. 924 * This operation is (worst case) O(N*M) where N is number of threads in the 939 queue_iterate(&task->threads, thread, thread_t, task_threads) { 984 /* update the task mask, and propagate it to existing threads */ 2298 * (hardware threads) from which the given @pmc can be accessed directly. 2468 * NOTE: You can reserve the same pmc for N different threads concurrently.
|