Changeset e9a1c99 in rtems


Ignore:
Timestamp:
11/27/13 23:56:53 (10 years ago)
Author:
Daniel Ramirez <javamonn@…>
Branches:
4.11, 5, master
Children:
c625a800
Parents:
a9051de9
git-author:
Daniel Ramirez <javamonn@…> (11/27/13 23:56:53)
git-committer:
Gedare Bloom <gedare@…> (11/28/13 01:50:10)
Message:

psxtmtests: copy psxtmthread05 to psxtmthread06, fix psxtmthread05

The psxtmthread05 test was testing the functionality meant for
psxtmthread06. This patch copies the psxtmthread05 to psxtmthread06
and modifies psxtmthread05 to test the intended functionality.

Location:
testsuites/psxtmtests
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtmtests/Makefile.am

    ra9051de9 re9a1c99  
    4444SUBDIRS += psxtmthread03
    4545SUBDIRS += psxtmthread05
     46SUBDIRS += psxtmthread06
    4647endif
    4748
  • testsuites/psxtmtests/configure.ac

    ra9051de9 re9a1c99  
    118118psxtmthread03/Makefile
    119119psxtmthread05/Makefile
     120psxtmthread06/Makefile
    120121])
    121122AC_OUTPUT
  • testsuites/psxtmtests/psxtmtests_plan.csv

    ra9051de9 re9a1c99  
    3737"pthread_setschedparam - no thread switch","psxtmthread04","psxtmtest_single w/multiple timings","No"
    3838"pthread_setschedparam - lower own priority, preempt","psxtmthread05","psxtmtest_single","Yes"
    39 "pthread_setschedparam - raise other priority, preempt","psxtmthread06","psxtmtest_single","No"
     39"pthread_setschedparam - raise other priority, preempt","psxtmthread06","psxtmtest_single","Yes"
    4040,,,
    4141"pthread_once",,,
  • testsuites/psxtmtests/psxtmthread05/init.c

    ra9051de9 re9a1c99  
    33 *  On-Line Applications Research Corporation (OAR).
    44 *  COPYRIGHT (c) 2013.
    5  *  Chirayu Desai (chirayudesai1@gmail.com).
    65 *
    76 *  The license and distribution terms for this file may be
     
    3837  /* make test_thread equal to POSIX_Init() */
    3938  pthread_getschedparam(pthread_self(), &policy, &param);
     39 
    4040  pthread_setschedparam(thread_ID, policy, &param);
    4141  /* At this point, we've switched to test_thread */
    4242
    4343  /* Back from test_thread, switch to test_thread again */
    44   param.sched_priority = sched_get_priority_max(policy) - 1;
     44  param.sched_priority = sched_get_priority_min(policy);
    4545
    4646  benchmark_timer_initialize();
    47   pthread_setschedparam(thread_ID, policy, &param);
     47  //lower own priority to minimun, scheduler forces an involuntary context switch
     48  pthread_setschedparam(pthread_self(), policy, &param);
    4849}
    4950
     
    5354{
    5455  long end_time;
    55 
    56   /* switch to POSIX_Init */
    5756  sched_yield();
    5857
    5958  end_time = benchmark_timer_read();
    60 
    6159  put_time(
    6260    "pthread_setschedparam - lower own priority, preempt",
Note: See TracChangeset for help on using the changeset viewer.