Home | History | Annotate | Download | only in tests

Lines Matching full:attributes

101   pthread_attr_t attributes;
102 ASSERT_EQ(0, pthread_attr_init(&attributes));
103 ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, static_cast<size_t>(-1) & ~(getpagesize() - 1)));
106 ASSERT_EQ(EAGAIN, pthread_create(&t, &attributes, IdFn, NULL));
355 pthread_attr_t attributes;
356 pthread_getattr_np(pthread_self(), &attributes);
357 pthread_attr_getguardsize(&attributes, reinterpret_cast<size_t*>(arg));
361 static size_t GetActualGuardSize(const pthread_attr_t& attributes) {
364 pthread_create(&t, &attributes, GetActualGuardSizeFn, &result);
371 pthread_attr_t attributes;
372 pthread_getattr_np(pthread_self(), &attributes);
373 pthread_attr_getstacksize(&attributes, reinterpret_cast<size_t*>(arg));
377 static size_t GetActualStackSize(const pthread_attr_t& attributes) {
380 pthread_create(&t, &attributes, GetActualStackSizeFn, &result);
387 pthread_attr_t attributes;
388 ASSERT_EQ(0, pthread_attr_init(&attributes));
392 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &default_guard_size));
395 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 128));
397 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size));
399 ASSERT_EQ(4096U, GetActualGuardSize(attributes));
402 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 32*1024));
403 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size));
407 ASSERT_EQ(0, pthread_attr_setguardsize(&attributes, 32*1024 + 1));
408 ASSERT_EQ(0, pthread_attr_getguardsize(&attributes, &guard_size));
413 pthread_attr_t attributes;
414 ASSERT_EQ(0, pthread_attr_init(&attributes));
418 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &default_stack_size));
421 ASSERT_EQ(EINVAL, pthread_attr_setstacksize(&attributes, 128));
423 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size));
425 ASSERT_GE(GetActualStackSize(attributes), default_stack_size);
428 ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, 32*1024));
429 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size));
431 ASSERT_EQ(GetActualStackSize(attributes), 32*1024U);
434 ASSERT_EQ(0, pthread_attr_setstacksize(&attributes, 32*1024 + 1));
435 ASSERT_EQ(0, pthread_attr_getstacksize(&attributes, &stack_size));
439 ASSERT_EQ(GetActualStackSize(attributes), (32 + 4)*1024U);
442 ASSERT_EQ(GetActualStackSize(attributes), 32*1024U);