Lines Matching refs:attr

174   pthread_attr_t attr;  in TEST()  local
175 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
176 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST()
179 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); in TEST()
202 pthread_attr_t attr; in TEST() local
203 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
204 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack.get(), stack_size)); in TEST()
207 ASSERT_EQ(0, pthread_create(&t, &attr, FnWithStackFrame, nullptr)); in TEST()
266 pthread_attr_t attr; in AssertDetached() local
267 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); in AssertDetached()
269 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state)); in AssertDetached()
270 pthread_attr_destroy(&attr); in AssertDetached()
863 pthread_rwlockattr_t attr; in TEST() local
864 ASSERT_EQ(0, pthread_rwlockattr_init(&attr)); in TEST()
868 ASSERT_EQ(0, pthread_rwlockattr_setpshared(&attr, pshared_value_array[i])); in TEST()
870 ASSERT_EQ(0, pthread_rwlockattr_getpshared(&attr, &pshared)); in TEST()
879 ASSERT_EQ(0, pthread_rwlockattr_setkind_np(&attr, kind_array[i])); in TEST()
881 ASSERT_EQ(0, pthread_rwlockattr_getkind_np(&attr, &kind)); in TEST()
886 ASSERT_EQ(0, pthread_rwlockattr_destroy(&attr)); in TEST()
1308 pthread_rwlockattr_t attr; in InitRwlock() local
1309 ASSERT_EQ(0, pthread_rwlockattr_init(&attr)); in InitRwlock()
1310 ASSERT_EQ(0, pthread_rwlockattr_setkind_np(&attr, kind_type)); in InitRwlock()
1311 ASSERT_EQ(0, pthread_rwlock_init(&lock, &attr)); in InitRwlock()
1312 ASSERT_EQ(0, pthread_rwlockattr_destroy(&attr)); in InitRwlock()
1485 pthread_attr_t attr; in TEST() local
1486 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
1489 ASSERT_EQ(0, pthread_attr_getscope(&attr, &scope)); in TEST()
1494 pthread_condattr_t attr; in TEST() local
1495 pthread_condattr_init(&attr); in TEST()
1498 ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock)); in TEST()
1502 ASSERT_EQ(0, pthread_condattr_getpshared(&attr, &pshared)); in TEST()
1507 pthread_condattr_t attr; in TEST() local
1508 pthread_condattr_init(&attr); in TEST()
1510 ASSERT_EQ(0, pthread_condattr_setclock(&attr, CLOCK_REALTIME)); in TEST()
1512 ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock)); in TEST()
1515 ASSERT_EQ(0, pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)); in TEST()
1516 ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock)); in TEST()
1519 ASSERT_EQ(EINVAL, pthread_condattr_setclock(&attr, CLOCK_PROCESS_CPUTIME_ID)); in TEST()
1524 pthread_condattr_t attr; in TEST() local
1525 pthread_condattr_init(&attr); in TEST()
1527 ASSERT_EQ(0, pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)); in TEST()
1528 ASSERT_EQ(0, pthread_condattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)); in TEST()
1531 ASSERT_EQ(0, pthread_cond_init(&cond_var, &attr)); in TEST()
1536 attr = static_cast<pthread_condattr_t>(*reinterpret_cast<uint32_t*>(cond_var.__private)); in TEST()
1538 ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock)); in TEST()
1541 ASSERT_EQ(0, pthread_condattr_getpshared(&attr, &pshared)); in TEST()
1570 pthread_condattr_t attr; in InitCond() local
1571 ASSERT_EQ(0, pthread_condattr_init(&attr)); in InitCond()
1572 ASSERT_EQ(0, pthread_condattr_setclock(&attr, clock)); in InitCond()
1573 ASSERT_EQ(0, pthread_cond_init(&cond, &attr)); in InitCond()
1574 ASSERT_EQ(0, pthread_condattr_destroy(&attr)); in InitCond()
1715 pthread_condattr_t attr; in pthread_cond_timedwait_timeout_helper() local
1716 pthread_condattr_init(&attr); in pthread_cond_timedwait_timeout_helper()
1718 ASSERT_EQ(0, pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)); in pthread_cond_timedwait_timeout_helper()
1720 ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock)); in pthread_cond_timedwait_timeout_helper()
1723 ASSERT_EQ(0, pthread_cond_init(&cond, &attr)); in pthread_cond_timedwait_timeout_helper()
1897 pthread_attr_t attr; in getstack_signal_handler() local
1898 ASSERT_EQ(0, pthread_getattr_np(pthread_self(), &attr)); in getstack_signal_handler()
1901 ASSERT_EQ(0, pthread_attr_getstack(&attr, &stack_base, &stack_size)); in getstack_signal_handler()
1904 ASSERT_LE(getstack_signal_handler_arg.signal_stack_base, &attr); in getstack_signal_handler()
1905 ASSERT_LT(static_cast<void*>(untag_address(&attr)), in getstack_signal_handler()
1937 pthread_attr_t attr; in TEST() local
1938 ASSERT_EQ(0, pthread_getattr_np(pthread_self(), &attr)); in TEST()
1941 ASSERT_EQ(0, pthread_attr_getstack(&attr, &main_stack_base, &main_stack_size)); in TEST()
2058 pthread_mutexattr_t attr; in TEST() local
2059 ASSERT_EQ(0, pthread_mutexattr_init(&attr)); in TEST()
2063 ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL)); in TEST()
2064 ASSERT_EQ(0, pthread_mutexattr_gettype(&attr, &attr_type)); in TEST()
2067 ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK)); in TEST()
2068 ASSERT_EQ(0, pthread_mutexattr_gettype(&attr, &attr_type)); in TEST()
2071 ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)); in TEST()
2072 ASSERT_EQ(0, pthread_mutexattr_gettype(&attr, &attr_type)); in TEST()
2075 ASSERT_EQ(0, pthread_mutexattr_destroy(&attr)); in TEST()
2079 pthread_mutexattr_t attr; in TEST() local
2080 ASSERT_EQ(0, pthread_mutexattr_init(&attr)); in TEST()
2083 ASSERT_EQ(0, pthread_mutexattr_getprotocol(&attr, &protocol)); in TEST()
2087 ASSERT_EQ(0, pthread_mutexattr_setprotocol(&attr, set_protocol)); in TEST()
2088 ASSERT_EQ(0, pthread_mutexattr_getprotocol(&attr, &protocol)); in TEST()
2107 pthread_mutexattr_t attr; in init() local
2108 ASSERT_EQ(0, pthread_mutexattr_init(&attr)); in init()
2109 ASSERT_EQ(0, pthread_mutexattr_settype(&attr, mutex_type)); in init()
2110 ASSERT_EQ(0, pthread_mutexattr_setprotocol(&attr, protocol)); in init()
2111 ASSERT_EQ(0, pthread_mutex_init(&lock, &attr)); in init()
2112 ASSERT_EQ(0, pthread_mutexattr_destroy(&attr)); in init()
2201 pthread_mutexattr_t attr; in TEST() local
2202 ASSERT_EQ(0, pthread_mutexattr_init(&attr)); in TEST()
2203 ASSERT_EQ(0, pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)); in TEST()
2209 ASSERT_EQ(0, pthread_mutex_init(&m, &attr)); in TEST()
2212 ASSERT_EQ(ENOMEM, pthread_mutex_init(&m, &attr)); in TEST()
2223 ASSERT_EQ(0, pthread_mutexattr_destroy(&attr)); in TEST()
2755 pthread_barrierattr_t attr; in TEST() local
2756 ASSERT_EQ(0, pthread_barrierattr_init(&attr)); in TEST()
2758 ASSERT_EQ(0, pthread_barrierattr_getpshared(&attr, &pshared)); in TEST()
2760 ASSERT_EQ(0, pthread_barrierattr_setpshared(&attr, PTHREAD_PROCESS_SHARED)); in TEST()
2761 ASSERT_EQ(0, pthread_barrierattr_getpshared(&attr, &pshared)); in TEST()
2763 ASSERT_EQ(0, pthread_barrierattr_destroy(&attr)); in TEST()
2913 pthread_attr_t attr; in TEST() local
2914 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
2917 ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)); in TEST()
2918 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &state)); in TEST()
2921 ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE)); in TEST()
2922 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &state)); in TEST()
2925 ASSERT_EQ(EINVAL, pthread_attr_setdetachstate(&attr, 123)); in TEST()
2926 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &state)); in TEST()
2934 pthread_attr_t attr; in TEST() local
2935 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
2936 ASSERT_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)); in TEST()
2956 int status = pthread_create(&t, &attr, IdFn, nullptr); in TEST()
2981 pthread_attr_t attr; in TEST() local
2982 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
2985 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED)); in TEST()
2986 ASSERT_EQ(0, pthread_attr_getinheritsched(&attr, &state)); in TEST()
2989 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)); in TEST()
2990 ASSERT_EQ(0, pthread_attr_getinheritsched(&attr, &state)); in TEST()
2993 ASSERT_EQ(EINVAL, pthread_attr_setinheritsched(&attr, 123)); in TEST()
2994 ASSERT_EQ(0, pthread_attr_getinheritsched(&attr, &state)); in TEST()
2999 pthread_attr_t attr; in TEST() local
3000 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
3004 ASSERT_EQ(0, pthread_attr_setschedparam(&attr, &param)); in TEST()
3005 ASSERT_EQ(0, pthread_attr_setschedpolicy(&attr, SCHED_FIFO)); in TEST()
3006 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED)); in TEST()
3009 ASSERT_EQ(0, pthread_create(&t, &attr, IdFn, nullptr)); in TEST()
3014 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)); in TEST()
3015 ASSERT_EQ(EINVAL, pthread_create(&t, &attr, IdFn, nullptr)); in TEST()
3028 pthread_attr_t attr; in TEST() local
3029 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
3030 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED)); in TEST()
3034 ASSERT_EQ(0, pthread_create(&t, &attr, spin_helper.GetFunction(), nullptr)); in TEST()
3049 pthread_attr_t attr; in TEST() local
3050 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
3051 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED)); in TEST()
3052 ASSERT_EQ(0, pthread_attr_setschedpolicy(&attr, SCHED_OTHER)); in TEST()
3056 ASSERT_EQ(0, pthread_create(&t, &attr, spin_helper.GetFunction(), nullptr)); in TEST()
3071 pthread_attr_t attr; in TEST() local
3072 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
3073 ASSERT_EQ(0, pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED)); in TEST()
3077 ASSERT_EQ(0, pthread_create(&t, &attr, spin_helper.GetFunction(), nullptr)); in TEST()