diff options
author | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2007-10-25 19:51:06 +0000 |
---|---|---|
committer | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2007-10-25 19:51:06 +0000 |
commit | 42f07c5fb7dbd9bdf635e3f98ff273a9ec362924 (patch) | |
tree | 2539629635f9ff008875d2a9c67fe21bf2e8e8cf /c/src/ada-tests/samples/nsecs/nsecs.adb | |
parent | 2007-10-25 Glenn Humphrey <glenn.humphrey@OARcorp.com> (diff) | |
download | rtems-42f07c5fb7dbd9bdf635e3f98ff273a9ec362924.tar.bz2 |
2007-10-25 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* configure.ac, samples/Makefile.am: Added a test for Clock_Get_Uptime
* samples/nsecs/.cvsignore, samples/nsecs/Makefile.am,
samples/nsecs/config.h, samples/nsecs/nsecs.adb,
samples/nsecs/nsecs.scn, samples/nsecs/sptest.adb,
samples/nsecs/sptest.ads: New files.
Diffstat (limited to '')
-rw-r--r-- | c/src/ada-tests/samples/nsecs/nsecs.adb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/c/src/ada-tests/samples/nsecs/nsecs.adb b/c/src/ada-tests/samples/nsecs/nsecs.adb new file mode 100644 index 0000000000..9e427d9ae7 --- /dev/null +++ b/c/src/ada-tests/samples/nsecs/nsecs.adb @@ -0,0 +1,55 @@ +-- +-- MAIN / BODY +-- +-- DESCRIPTION: +-- +-- This is the entry point for Test Nsecs of the Sample Test Suite. +-- +-- DEPENDENCIES: +-- +-- +-- +-- COPYRIGHT (c) 1989-2007. +-- On-Line Applications Research Corporation (OAR). +-- +-- The license and distribution terms for this file may in +-- the file LICENSE in this distribution or at +-- http://www.rtems.com/license/LICENSE. +-- +-- $Id$ +-- + +with RTEMS; +with SPTEST; +with TEST_SUPPORT; + +procedure Nsecs 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 Nsecs; + |