Ignore:
Timestamp:
Nov 30, 2013, 9:42:38 PM (6 years ago)
Author:
Daniel Ramirez <javamonn@…>
Branches:
4.11, master
Children:
adc2301
Parents:
135e957
git-author:
Daniel Ramirez <javamonn@…> (11/30/13 21:42:38)
git-committer:
Joel Sherrill <joel.sherrill@…> (11/30/13 21:50:25)
Message:

fixed psxtmthread02 test, updated .csv to be in sync and added test .docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtmtests/psxtmthread02/init.c

    r135e957 r115e059  
    11/*
    2  *  COPYRIGHT (c) 1989-2012.
     2 *  COPYRIGHT (c) 1989-2013.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2424void benchmark_pthread_create(void)
    2525{
    26   long end_time;
    2726  int  status;
    2827  pthread_t thread_ID;
     28  pthread_attr_t attr;
     29  struct sched_param param;
    2930
     31  pthread_attr_init(&attr);
     32  pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
     33  pthread_attr_setschedpolicy(&attr, SCHED_FIFO);
     34  param.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
     35  pthread_attr_setschedparam(&attr, &param);
     36
     37  /* create second thread with max priority and get preempted on creation */
    3038  benchmark_timer_initialize();
    31  
    32   status = pthread_create(&thread_ID, NULL, thread, NULL);
    33   rtems_test_assert( status == 0 );
    34  
     39  status = pthread_create(&thread_ID, &attr, thread, NULL);
     40}
     41
     42void *thread(
     43  void *argument
     44)
     45{
     46  long end_time;
     47
    3548  end_time = benchmark_timer_read();
    36 
    37   rtems_test_assert( status == 0 );
    38 
    3949  put_time(
    4050    "pthread_create - preempt",
     
    4454    0
    4555  );
    46 
    47 }
    48 
    49 void *thread(
    50   void *argument
    51 )
    52 {
    53   //Empty thread used in pthread_create().
    5456  return NULL;
    5557}
Note: See TracChangeset for help on using the changeset viewer.