source: rtems/testsuites/sptests/sp04/system.h @ b8a5abf

4.115
Last change on this file since b8a5abf was b8a5abf, checked in by Sebastian Huber <sebastian.huber@…>, on 02/26/15 at 09:33:36

score: Update _Thread_Heir only if necessary

Previously, the _Thread_Heir was updated unconditionally in case a new
heir was determined. The _Thread_Dispatch_necessary was only updated in
case the executing thread was preemptible or an internal thread was
unblocked. Change this to update the _Thread_Heir and
_Thread_Dispatch_necessary only in case the currently selected heir
thread is preemptible or a dispatch is forced. Move the schedule
decision into the change priority operation and use the schedule
operation only in rtems_task_mode() in case preemption is enabled or an
ASR dispatch is necessary. This is a behaviour change. Previously, the
RTEMS_NO_PREEMPT also prevented signal delivery in certain cases (not
always). Now, signal delivery is no longer influenced by
RTEMS_NO_PREEMPT. Since the currently selected heir thread is used to
determine if a new heir is chosen, non-preemptible heir threads
currently not executing now prevent a new heir. This may have an
application impact, see change test tm04. Document this change in sp04.

Update #2273.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  system.h
2 *
3 *  This include file contains information that is included in every
4 *  function in the test set.
5 *
6 *  COPYRIGHT (c) 1989-2009.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#include <tmacros.h>
15
16/* functions */
17
18rtems_task Init(
19  rtems_task_argument argument
20);
21
22rtems_task Task_1(
23  rtems_task_argument argument
24);
25
26rtems_task Task_2(
27  rtems_task_argument argument
28);
29
30rtems_task Task_3(
31  rtems_task_argument argument
32);
33
34void Task_switch(
35  rtems_tcb *unused,
36  rtems_tcb *heir
37);
38
39/* configuration information */
40
41#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
42#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
43
44#define CONFIGURE_MAXIMUM_USER_EXTENSIONS     1
45#define CONFIGURE_TICKS_PER_TIMESLICE       100
46
47#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
48
49#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
50
51#define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
52#define CONFIGURE_MAXIMUM_TASKS             4
53#define CONFIGURE_MAXIMUM_TIMERS            1
54
55#include <rtems/confdefs.h>
56
57/* global variables */
58
59TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
60TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
61
62TEST_EXTERN rtems_id   Extension_id[ 4 ];
63TEST_EXTERN rtems_name Extension_name[ 4 ];  /* array of task names */
64
65/* array of task run counts */
66TEST_EXTERN volatile uint32_t   Run_count[ 4 ];
67
68/*
69 * Keep track of task switches
70 */
71
72struct taskSwitchLog {
73  unsigned int      taskIndex;
74  rtems_time_of_day when;
75};
76
77extern struct taskSwitchLog taskSwitchLog[];
78extern unsigned int taskSwitchLogIndex;
79extern volatile int testsFinished;
80
81
82/* end of include file */
Note: See TracBrowser for help on using the repository browser.