forked from Imagelibrary/rtems
new file
This commit is contained in:
58
c/src/ada-tests/samples/base_sp/base_sp.adb
Normal file
58
c/src/ada-tests/samples/base_sp/base_sp.adb
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
--
|
||||||
|
-- MAIN / BODY
|
||||||
|
--
|
||||||
|
-- DESCRIPTION:
|
||||||
|
--
|
||||||
|
-- This is the entry point for Base Single Process Example of the
|
||||||
|
-- Sample Test Suite.
|
||||||
|
--
|
||||||
|
-- DEPENDENCIES:
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- COPYRIGHT (c) 1989-1997.
|
||||||
|
-- On-Line Applications Research Corporation (OAR).
|
||||||
|
-- Copyright assigned to U.S. Government, 1994.
|
||||||
|
--
|
||||||
|
-- The license and distribution terms for this file may in
|
||||||
|
-- the file LICENSE in this distribution or at
|
||||||
|
-- http://www.OARcorp.com/rtems/license.html.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
--
|
||||||
|
|
||||||
|
with RTEMS;
|
||||||
|
with SPTEST;
|
||||||
|
with TEST_SUPPORT;
|
||||||
|
|
||||||
|
procedure Base_SP is
|
||||||
|
INIT_ID : RTEMS.ID;
|
||||||
|
STATUS : RTEMS.STATUS_CODES;
|
||||||
|
begin
|
||||||
|
|
||||||
|
RTEMS.TASK_CREATE(
|
||||||
|
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
|
||||||
|
1,
|
||||||
|
RTEMS.MINIMUM_STACK_SIZE,
|
||||||
|
RTEMS.NO_PREEMPT,
|
||||||
|
RTEMS.DEFAULT_ATTRIBUTES,
|
||||||
|
INIT_ID,
|
||||||
|
STATUS
|
||||||
|
);
|
||||||
|
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
|
||||||
|
|
||||||
|
|
||||||
|
RTEMS.TASK_START(
|
||||||
|
INIT_ID,
|
||||||
|
SPTEST.INIT'ACCESS,
|
||||||
|
0,
|
||||||
|
STATUS
|
||||||
|
);
|
||||||
|
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
|
||||||
|
|
||||||
|
loop
|
||||||
|
delay 120.0;
|
||||||
|
end loop;
|
||||||
|
|
||||||
|
end Base_SP;
|
||||||
|
|
||||||
33
c/src/ada-tests/samples/base_sp/config.h
Normal file
33
c/src/ada-tests/samples/base_sp/config.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/* config.h
|
||||||
|
*
|
||||||
|
* This include file defines the Configuration Table for this test.
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-1997.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
* Copyright assigned to U.S. Government, 1994.
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may in
|
||||||
|
* the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* configuration information */
|
||||||
|
|
||||||
|
#define CONFIGURE_SPTEST
|
||||||
|
|
||||||
|
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
|
||||||
|
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
|
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
|
||||||
|
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
|
||||||
|
|
||||||
|
#include <confdefs.h>
|
||||||
|
|
||||||
|
/* end of include file */
|
||||||
33
c/src/ada-tests/samples/ticker/config.h
Normal file
33
c/src/ada-tests/samples/ticker/config.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/* config.h
|
||||||
|
*
|
||||||
|
* This include file defines the Configuration Table for this test.
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-1997.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
* Copyright assigned to U.S. Government, 1994.
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may in
|
||||||
|
* the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* configuration information */
|
||||||
|
|
||||||
|
#define CONFIGURE_SPTEST
|
||||||
|
|
||||||
|
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
|
||||||
|
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
|
||||||
|
|
||||||
|
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
|
||||||
|
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_THREADS 10
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_KEYS 10
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 20
|
||||||
|
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 10
|
||||||
|
|
||||||
|
#include <confdefs.h>
|
||||||
|
|
||||||
|
/* end of include file */
|
||||||
57
c/src/ada-tests/samples/ticker/ticker.adb
Normal file
57
c/src/ada-tests/samples/ticker/ticker.adb
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
--
|
||||||
|
-- MAIN / BODY
|
||||||
|
--
|
||||||
|
-- DESCRIPTION:
|
||||||
|
--
|
||||||
|
-- This is the entry point for Test Ticker of the Sample Test Suite.
|
||||||
|
--
|
||||||
|
-- DEPENDENCIES:
|
||||||
|
--
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- COPYRIGHT (c) 1989-1997.
|
||||||
|
-- On-Line Applications Research Corporation (OAR).
|
||||||
|
-- Copyright assigned to U.S. Government, 1994.
|
||||||
|
--
|
||||||
|
-- The license and distribution terms for this file may in
|
||||||
|
-- the file LICENSE in this distribution or at
|
||||||
|
-- http://www.OARcorp.com/rtems/license.html.
|
||||||
|
--
|
||||||
|
-- $Id$
|
||||||
|
--
|
||||||
|
|
||||||
|
with RTEMS;
|
||||||
|
with SPTEST;
|
||||||
|
with TEST_SUPPORT;
|
||||||
|
|
||||||
|
procedure Ticker is
|
||||||
|
INIT_ID : RTEMS.ID;
|
||||||
|
STATUS : RTEMS.STATUS_CODES;
|
||||||
|
begin
|
||||||
|
|
||||||
|
RTEMS.TASK_CREATE(
|
||||||
|
RTEMS.BUILD_NAME( 'I', 'N', 'I', 'T' ),
|
||||||
|
1,
|
||||||
|
RTEMS.MINIMUM_STACK_SIZE,
|
||||||
|
RTEMS.NO_PREEMPT,
|
||||||
|
RTEMS.DEFAULT_ATTRIBUTES,
|
||||||
|
INIT_ID,
|
||||||
|
STATUS
|
||||||
|
);
|
||||||
|
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
|
||||||
|
|
||||||
|
|
||||||
|
RTEMS.TASK_START(
|
||||||
|
INIT_ID,
|
||||||
|
SPTEST.INIT'ACCESS,
|
||||||
|
0,
|
||||||
|
STATUS
|
||||||
|
);
|
||||||
|
TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
|
||||||
|
|
||||||
|
loop
|
||||||
|
delay 120.0;
|
||||||
|
end loop;
|
||||||
|
|
||||||
|
end Ticker;
|
||||||
|
|
||||||
Reference in New Issue
Block a user