Lines Matching refs:thread_count
17 int thread_count = *(int*)(p); in thread_func() local
20 if (thread_count > 0) in thread_func()
22 thread_count--; in thread_func()
24 s_arg[thread_count] = thread_count; in thread_func()
27 pthread_create(&s_thread[thread_count], &attr, thread_func, in thread_func()
28 &s_arg[thread_count]); in thread_func()
31 std::cout << "created " << thread_count << "(" << s_thread[thread_count] in thread_func()
41 unsigned thread_count; in main() local
44 thread_count = argc > 1 ? atoi(argv[1]) : 50; in main()
45 assert(thread_count <= sizeof(s_thread) / sizeof(s_thread[0])); in main()
46 assert(thread_count >= 1); in main()
47 thread_count--; in main()
51 pthread_create(&s_thread[thread_count], &attr, thread_func, in main()
52 &thread_count); in main()
55 std::cout << "created " << thread_count << "(" << s_thread[thread_count] in main()
58 for (i = thread_count; i >= 0; i--) in main()