summaryrefslogtreecommitdiffstats
path: root/testsuites/samples/fileio
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-05-05 16:45:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-05-05 16:45:40 +0000
commit7c1e69429a28adf03216c755bc1b4504c6e735b2 (patch)
tree891479b5bad29f5dc64d0a430f768d7514ecbec5 /testsuites/samples/fileio
parent2011-05-05 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-7c1e69429a28adf03216c755bc1b4504c6e735b2.tar.bz2
2011-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* base_sp/apptask.c, base_sp/init.c, fileio/init.c, fileio/system.h, nsecs/init.c, ticker/init.c, ticker/system.h, ticker/tasks.c: Remove warnings.
Diffstat (limited to 'testsuites/samples/fileio')
-rw-r--r--testsuites/samples/fileio/init.c5
-rw-r--r--testsuites/samples/fileio/system.h53
2 files changed, 5 insertions, 53 deletions
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index 5a09f217d6..229baab08c 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -10,7 +10,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-2009.
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -707,10 +707,13 @@ Init (rtems_task_argument ignored)
RTEMS_DEFAULT_MODES ,
RTEMS_FLOATING_POINT | RTEMS_DEFAULT_ATTRIBUTES, &Task_id
);
+ directive_failed( status, "create" );
status = rtems_task_start( Task_id, fileio_task, 1 );
+ directive_failed( status, "start" );
status = rtems_task_delete( RTEMS_SELF );
+ directive_failed( status, "delete" );
}
#if defined(USE_SHELL)
diff --git a/testsuites/samples/fileio/system.h b/testsuites/samples/fileio/system.h
index f6663d8fd5..07044238a3 100644
--- a/testsuites/samples/fileio/system.h
+++ b/testsuites/samples/fileio/system.h
@@ -14,6 +14,7 @@
*/
#include <rtems.h>
+#include "tmacros.h"
/* functions */
@@ -63,56 +64,4 @@ rtems_task Init(
#define CONFIGURE_UNIFIED_WORK_AREAS
#include <rtems/confdefs.h>
-/*
- * Handy macros and static inline functions
- */
-
-/*
- * Macro to hide the ugliness of printing the time.
- */
-
-#define print_time(_s1, _tb, _s2) \
- do { \
- printf( "%s%02d:%02d:%02d %02d/%02d/%04d%s", \
- _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \
- (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \
- fflush(stdout); \
- } while ( 0 )
-
-/*
- * Macro to print an task name that is composed of ASCII characters.
- *
- */
-
-#define put_name( _name, _crlf ) \
- do { \
- uint32_t c0, c1, c2, c3; \
- \
- c0 = ((_name) >> 24) & 0xff; \
- c1 = ((_name) >> 16) & 0xff; \
- c2 = ((_name) >> 8) & 0xff; \
- c3 = (_name) & 0xff; \
- putchar( (char)c0 ); \
- if ( c1 ) putchar( (char)c1 ); \
- if ( c2 ) putchar( (char)c2 ); \
- if ( c3 ) putchar( (char)c3 ); \
- if ( (_crlf) ) \
- putchar( '\n' ); \
- } while (0)
-
-/*
- * This allows us to view the "Test_task" instantiations as a set
- * of numbered tasks by eliminating the number of application
- * tasks created.
- *
- * In reality, this is too complex for the purposes of this
- * example. It would have been easier to pass a task argument. :)
- * But it shows how rtems_id's can sometimes be used.
- */
-
-#define task_number( tid ) \
- ( rtems_object_id_get_index( tid ) - \
- rtems_configuration_get_rtems_api_configuration()-> \
- number_of_initialization_tasks )
-
/* end of include file */