mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-04-04 17:50:31 +00:00
psxtmthreadattr01: Correct mistakes in previous merge (GCI 2018)
Joel admits to grabbing one iteration too early of the patch. :(
This commit is contained in:
committed by
Joel Sherrill
parent
8abb230b77
commit
841b54ee6a
@@ -28,8 +28,9 @@
|
||||
|
||||
"pthread_create: no preempt","psxtmthread01","psxtmtest_single","Yes"
|
||||
"pthread_create: preempt","psxtmthread02","psxtmtest_single","Yes"
|
||||
"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
|
||||
"pthread_attr_init: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
|
||||
"pthread_attr_destroy: only case", "psxtmthreadattr01", "psxtmtest_init_destroy","Yes"
|
||||
"pthread_attr_getdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
@@ -37,7 +38,7 @@
|
||||
"pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","yes"
|
||||
"pthread_attr_setdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_setguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_setinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
@@ -46,6 +47,7 @@
|
||||
"pthread_attr_setscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
"pthread_attr_setstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes"
|
||||
|
||||
|
||||
"pthread_join"
|
||||
"pthread_detach"
|
||||
"pthread_exit"
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 26 and column 33.
|
@@ -25,6 +25,7 @@
|
||||
#include <pthread.h>
|
||||
#include <timesys.h>
|
||||
#include <sched.h>
|
||||
|
||||
#define GUARDSIZE_TEST_VALUE 512
|
||||
#define STACKSIZE_TEST_VALUE 1024
|
||||
|
||||
@@ -37,7 +38,6 @@ static pthread_attr_t attr;
|
||||
static size_t guardsize = GUARDSIZE_TEST_VALUE;
|
||||
static size_t stacksize = STACKSIZE_TEST_VALUE;
|
||||
static struct sched_param param;
|
||||
static int var = 2;
|
||||
static void *stackaddr;
|
||||
|
||||
static void benchmark_create_pthread_attr(void)
|
||||
@@ -84,13 +84,13 @@ static void benchmark_pthread_attr_getdetachstate(void)
|
||||
{
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int tmp_var;
|
||||
int detachstate;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
status = pthread_attr_getdetachstate(&attr, &tmp_var);
|
||||
status = pthread_attr_getdetachstate(&attr, &detachstate);
|
||||
end_time = benchmark_timer_read();
|
||||
rtems_test_assert( status == 0 );
|
||||
rtems_test_assert( tmp_var == PTHREAD_CREATE_DETACHED );
|
||||
rtems_test_assert( detachstate == PTHREAD_CREATE_DETACHED );
|
||||
|
||||
put_time(
|
||||
"pthread_attr_getdetachstate: only case",
|
||||
@@ -168,13 +168,13 @@ static void benchmark_pthread_attr_getinheritsched(void)
|
||||
{
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int tmp_var;
|
||||
int inheritsched;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
status = pthread_attr_getinheritsched(&attr, &tmp_var);
|
||||
status = pthread_attr_getinheritsched(&attr, &inheritsched);
|
||||
end_time = benchmark_timer_read();
|
||||
rtems_test_assert( status == 0 );
|
||||
rtems_test_assert( tmp_var == PTHREAD_EXPLICIT_SCHED );
|
||||
rtems_test_assert( inheritsched == PTHREAD_EXPLICIT_SCHED );
|
||||
|
||||
put_time(
|
||||
"pthread_attr_getinheritsched: only case",
|
||||
@@ -240,7 +240,7 @@ static void benchmark_pthread_attr_setschedpolicy(void)
|
||||
int status;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
status = pthread_attr_setschedpolicy(&attr, var);
|
||||
status = pthread_attr_setschedpolicy(&attr, SCHED_RR);
|
||||
end_time = benchmark_timer_read();
|
||||
rtems_test_assert( status == 0 );
|
||||
|
||||
@@ -258,13 +258,13 @@ static void benchmark_pthread_attr_getschedpolicy(void)
|
||||
{
|
||||
benchmark_timer_t end_time;
|
||||
int status;
|
||||
int tmp_var;
|
||||
int policy;
|
||||
|
||||
benchmark_timer_initialize();
|
||||
status = pthread_attr_getschedpolicy(&attr, &tmp_var);
|
||||
status = pthread_attr_getschedpolicy(&attr, &policy);
|
||||
end_time = benchmark_timer_read();
|
||||
rtems_test_assert( status == 0 );
|
||||
rtems_test_assert( tmp_var == var );
|
||||
rtems_test_assert( policy == SCHED_RR );
|
||||
|
||||
put_time(
|
||||
"pthread_attr_getschedpolicy: only case",
|
||||
|
||||
Reference in New Issue
Block a user