source: rtems/testsuites/smptests/smp02/system.h @ db0cede1

4.115
Last change on this file since db0cede1 was db0cede1, checked in by Sebastian Huber <sebastian.huber@…>, on 01/18/13 at 08:42:00

smptests/smp01: Fix semaphore count

The locked print needs one semaphore.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#include "tmacros.h"
11#include "test_support.h"
12
13/* functions */
14
15rtems_task Init(
16  rtems_task_argument argument
17);
18
19rtems_task Test_task(
20  rtems_task_argument argument
21);
22
23/* configuration information */
24
25#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
26#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
27
28#define CONFIGURE_SMP_APPLICATION
29#define CONFIGURE_SMP_MAXIMUM_PROCESSORS   4
30
31#define CONFIGURE_MAXIMUM_TASKS            \
32    (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
33
34#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
35#define CONFIGURE_INIT_TASK_STACK_SIZE \
36    (3 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
37
38#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
39
40#define CONFIGURE_MAXIMUM_SEMAPHORES          2
41
42#include <rtems/confdefs.h>
43
44
45/* global variables */
46
47/*
48 *  Keep the names and IDs in global variables so another task can use them.
49 */
50
51typedef struct {
52  bool     IsLocked;
53  int      cpu_num;
54  uint32_t task_index;
55} Log_t;
56
57#define           LOG_SIZE   20
58
59TEST_EXTERN rtems_id   Semaphore;      /* synchronisation semaphore */
60TEST_EXTERN Log_t      Log[LOG_SIZE];  /* A log of locks/unlocks */
61TEST_EXTERN volatile uint32_t   Log_index;      /* Index into log */
62
63/*
64 *  Handy macros and static inline functions
65 */
66
67/*
68 *  Macro to hide the ugliness of printing the time.
69 */
70
71/* end of include file */
Note: See TracBrowser for help on using the repository browser.