Changeset adc2301 in rtems
- Timestamp:
- 11/30/13 22:06:07 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 086494d5
- Parents:
- 115e059
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/psxtmtests/psxtmthread02/init.c
r115e059 radc2301 14 14 #include <timesys.h> 15 15 #include <pthread.h> 16 #include <sched.h> 16 17 #include <rtems/timerdrv.h> 17 18 #include "test_support.h" … … 29 30 struct sched_param param; 30 31 31 pthread_attr_init(&attr); 32 pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); 33 pthread_attr_setschedpolicy(&attr, SCHED_FIFO); 32 status = pthread_attr_init(&attr); 33 rtems_test_assert( status == 0 ); 34 35 status = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); 36 rtems_test_assert( status == 0 ); 37 38 status = pthread_attr_setschedpolicy(&attr, SCHED_FIFO); 39 rtems_test_assert( status == 0 ); 40 34 41 param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1; 35 pthread_attr_setschedparam(&attr, ¶m); 42 status = pthread_attr_setschedparam(&attr, ¶m); 43 rtems_test_assert( status == 0 ); 36 44 37 45 /* create second thread with max priority and get preempted on creation */
Note: See TracChangeset
for help on using the changeset viewer.