Changeset 23b1bb38 in rtems
- Timestamp:
- 06/13/16 04:53:27 (7 years ago)
- Branches:
- 5, master
- Children:
- fc30ac5
- Parents:
- a0cd238d
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/13/16 04:53:27)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/13/16 12:56:21)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/posix/src/pthreadgetschedparam.c
ra0cd238d r23b1bb38 55 55 *param = api->schedparam; 56 56 param->sched_priority = _POSIX_Priority_From_core( 57 the_thread-> current_priority57 the_thread->real_priority 58 58 ); 59 59 -
testsuites/psxtests/psx05/init.c
ra0cd238d r23b1bb38 113 113 } 114 114 115 static void test_get_priority( void ) 116 { 117 int status; 118 pthread_mutexattr_t attr; 119 pthread_mutex_t mutex; 120 int policy; 121 struct sched_param param; 122 int real_priority; 123 124 status = pthread_getschedparam( pthread_self(), &policy, ¶m ); 125 rtems_test_assert( status == 0 ); 126 127 real_priority = param.sched_priority; 128 129 status = pthread_mutexattr_init( &attr ); 130 rtems_test_assert( status == 0 ); 131 132 status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_PROTECT ); 133 rtems_test_assert( !status ); 134 135 status = pthread_mutexattr_setprioceiling( &attr, real_priority + 1 ); 136 rtems_test_assert( status == 0 ); 137 138 status = pthread_mutex_init( &mutex, &attr ); 139 rtems_test_assert( status == 0 ); 140 141 status = pthread_mutexattr_destroy( &attr ); 142 rtems_test_assert( status == 0 ); 143 144 status = pthread_mutex_lock( &mutex ); 145 rtems_test_assert( status == 0 ); 146 147 status = pthread_getschedparam( pthread_self(), &policy, ¶m ); 148 rtems_test_assert( status == 0 ); 149 150 rtems_test_assert( real_priority == param.sched_priority ); 151 152 status = pthread_mutex_unlock( &mutex ); 153 rtems_test_assert( status == 0 ); 154 155 status = pthread_mutex_destroy( &mutex ); 156 rtems_test_assert( status == 0 ); 157 } 158 115 159 void *POSIX_Init( 116 160 void *argument … … 134 178 TEST_BEGIN(); 135 179 180 test_get_priority(); 181 136 182 /* set the time of day, and print our buffer in multiple ways */ 137 183
Note: See TracChangeset
for help on using the changeset viewer.