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.
This commit is contained in:
Joel Sherrill
2011-05-05 16:45:40 +00:00
parent 355d79fae6
commit 7c1e69429a
9 changed files with 45 additions and 98 deletions

View File

@@ -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 */