Lines Matching refs:attributes
262 pthread_attr_t attributes; in TEST() local
263 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
264 …ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, static_cast<size_t>(-1) & ~(getpagesize() - 1)… in TEST()
267 ASSERT_EQ(EAGAIN, pthread_create(&t, &attributes, IdFn, nullptr)); in TEST()
724 pthread_attr_t attributes; in GetActualGuardSizeFn() local
725 pthread_getattr_np(pthread_self(), &attributes); in GetActualGuardSizeFn()
726 pthread_attr_getguardsize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualGuardSizeFn()
730 static size_t GetActualGuardSize(const pthread_attr_t& attributes) { in GetActualGuardSize() argument
733 pthread_create(&t, &attributes, GetActualGuardSizeFn, &result); in GetActualGuardSize()
739 pthread_attr_t attributes; in GetActualStackSizeFn() local
740 pthread_getattr_np(pthread_self(), &attributes); in GetActualStackSizeFn()
741 pthread_attr_getstacksize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualStackSizeFn()
745 static size_t GetActualStackSize(const pthread_attr_t& attributes) { in GetActualStackSize() argument
748 pthread_create(&t, &attributes, GetActualStackSizeFn, &result); in GetActualStackSize()
754 pthread_attr_t attributes; in TEST() local
755 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
758 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 128)); in TEST()
760 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size)); in TEST()
762 ASSERT_EQ(4096U, GetActualGuardSize(attributes)); in TEST()
766 pthread_attr_t attributes; in TEST() local
767 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
770 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 32*1024)); in TEST()
772 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size)); in TEST()
774 ASSERT_EQ(32*1024U, GetActualGuardSize(attributes)); in TEST()
778 pthread_attr_t attributes; in TEST() local
779 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
782 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 32*1024 + 1)); in TEST()
784 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size)); in TEST()
786 ASSERT_EQ(36*1024U, GetActualGuardSize(attributes)); in TEST()
790 pthread_attr_t attributes; in TEST() local
791 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
796 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 32*1024*1024)); in TEST()
798 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size)); in TEST()
800 ASSERT_EQ(32*1024*1024U, GetActualGuardSize(attributes)); in TEST()
804 pthread_attr_t attributes; in TEST() local
805 ASSERT_EQ(0, pthread_attr_init(&attributes)); in TEST()
809 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &default_stack_size)); in TEST()
812 ASSERT_EQ(EINVAL, pthread_attr_setstacksize(&attributes, 128)); in TEST()
814 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size)); in TEST()
816 ASSERT_GE(GetActualStackSize(attributes), default_stack_size); in TEST()
819 ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, 32*1024)); in TEST()
820 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size)); in TEST()
822 ASSERT_GE(GetActualStackSize(attributes), 32*1024U); in TEST()
825 ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, 32*1024 + 1)); in TEST()
826 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size)); in TEST()
829 ASSERT_GT(GetActualStackSize(attributes), 32*1024U + 1); in TEST()
832 ASSERT_EQ(GetActualStackSize(attributes), 32*1024U); in TEST()
1720 pthread_attr_t attributes; in TEST() local
1721 ASSERT_EQ(0, pthread_getattr_np(pthread_self(), &attributes)); in TEST()
1725 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size)); in TEST()
1731 ASSERT_EQ(0, pthread_attr_getstack(&attributes, &stack_base, &stack_size)); in TEST()
1733 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size2)); in TEST()
1781 ASSERT_EQ(0, pthread_getattr_np(pthread_self(), &attributes)); in TEST()
1782 ASSERT_EQ(0, pthread_attr_getstack(&attributes, &stack_base, &stack_size)); in TEST()
1783 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size2)); in TEST()
1795 ASSERT_EQ(0, pthread_getattr_np(pthread_self(), &attributes)); in TEST()
1796 ASSERT_EQ(0, pthread_attr_getstack(&attributes, &stack_base, &stack_size)); in TEST()
1797 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size2)); in TEST()
1879 pthread_attr_t attributes; in pthread_attr_getstack_18908062_helper() local
1880 pthread_getattr_np(pthread_self(), &attributes); in pthread_attr_getstack_18908062_helper()
1883 pthread_attr_getstack(&attributes, &stack_base, &stack_size); in pthread_attr_getstack_18908062_helper()