change log for examples-v2 (2011-06-13)
rtems-vc at rtems.org
rtems-vc at rtems.org
Mon Jun 13 15:10:06 UTC 2011
*joel*:
2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
* nbench/nbench-byte-2.2.3/sysspec.c: Eliminate use of obsolete
rtems_clock_get().
M 1.3 benchmarks/ChangeLog
M 1.2 benchmarks/nbench/nbench-byte-2.2.3/sysspec.c
diff -u examples-v2/benchmarks/ChangeLog:1.2 examples-v2/benchmarks/ChangeLog:1.3
--- examples-v2/benchmarks/ChangeLog:1.2 Fri Apr 1 13:11:26 2011
+++ examples-v2/benchmarks/ChangeLog Mon Jun 13 09:18:56 2011
@@ -1,3 +1,8 @@
+2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * nbench/nbench-byte-2.2.3/sysspec.c: Eliminate use of obsolete
+ rtems_clock_get().
+
2011-04-01 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile: Update to account for movement of .cfg files.
diff -u examples-v2/benchmarks/nbench/nbench-byte-2.2.3/sysspec.c:1.1 examples-v2/benchmarks/nbench/nbench-byte-2.2.3/sysspec.c:1.2
--- examples-v2/benchmarks/nbench/nbench-byte-2.2.3/sysspec.c:1.1 Thu Mar 17 08:24:17 2011
+++ examples-v2/benchmarks/nbench/nbench-byte-2.2.3/sysspec.c Mon Jun 13 09:18:56 2011
@@ -849,8 +849,6 @@
#ifdef CLOCKWCPS
/* Everybody else */
-//int tickspersec;
-//rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &tickspersec);
return((unsigned long)(tickamount/10000));
#endif
@@ -880,9 +878,6 @@
#ifdef CLOCKWCPS
/* Everybody else */
-//int tickspersec;
-//rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &tickspersec);
-
return((double)tickamount/(double)1000);
#endif
*joel*:
2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
* classic_signal/test.c, triple_period/init.c, triple_period/system.h,
triple_period/tasks.c: Eliminate use of obsolete rtems_clock_get().
M 1.5 classic_api/ChangeLog
M 1.3 classic_api/classic_signal/test.c
M 1.2 classic_api/triple_period/init.c
M 1.2 classic_api/triple_period/system.h
M 1.2 classic_api/triple_period/tasks.c
diff -u examples-v2/classic_api/ChangeLog:1.4 examples-v2/classic_api/ChangeLog:1.5
--- examples-v2/classic_api/ChangeLog:1.4 Fri Apr 1 13:11:28 2011
+++ examples-v2/classic_api/ChangeLog Mon Jun 13 09:18:58 2011
@@ -1,3 +1,8 @@
+2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * classic_signal/test.c, triple_period/init.c, triple_period/system.h,
+ triple_period/tasks.c: Eliminate use of obsolete rtems_clock_get().
+
2011-04-01 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile: Update to account for movement of .cfg files.
diff -u examples-v2/classic_api/classic_signal/test.c:1.2 examples-v2/classic_api/classic_signal/test.c:1.3
--- examples-v2/classic_api/classic_signal/test.c:1.2 Thu Mar 3 12:00:30 2011
+++ examples-v2/classic_api/classic_signal/test.c Mon Jun 13 09:18:58 2011
@@ -64,8 +64,7 @@
/*
* Get starting time
*/
- status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start );
- assert( status == RTEMS_SUCCESSFUL );
+ start = rtems_clock_get_ticks_since_boot();
status = rtems_signal_catch( signal_handler, RTEMS_DEFAULT_MODES );
assert( status == RTEMS_SUCCESSFUL );
@@ -80,8 +79,7 @@
assert( status == RTEMS_SUCCESSFUL );
while (1) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now );
- assert( status == RTEMS_SUCCESSFUL );
+ now = rtems_clock_get_ticks_since_boot();
if ( (now-start) > 100 ) {
puts( "Signal from ISR did not get processed\n" );
exit( 0 );
diff -u examples-v2/classic_api/triple_period/init.c:1.1 examples-v2/classic_api/triple_period/init.c:1.2
--- examples-v2/classic_api/triple_period/init.c:1.1 Thu Aug 6 15:25:58 2009
+++ examples-v2/classic_api/triple_period/init.c Mon Jun 13 09:18:58 2011
@@ -33,9 +33,9 @@
puts( "*** This demo shows three different ways of running periodic tasks ***" );
puts( "*** It also demonstrates the CPU usage and Rate Monotonic statitistics utilities ***" );
- rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
+ ticks_per_second = rtems_clock_get_ticks_per_second();
printf("\nTicks per second in your system: %" PRIu32 "\n", ticks_per_second);
- rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks_since_boot );
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
printf("Ticks since boot: %" PRIu32 "\n\n", ticks_since_boot);
time.year = 1988;
diff -u examples-v2/classic_api/triple_period/system.h:1.1 examples-v2/classic_api/triple_period/system.h:1.2
--- examples-v2/classic_api/triple_period/system.h:1.1 Thu Aug 6 15:25:58 2009
+++ examples-v2/classic_api/triple_period/system.h Mon Jun 13 09:18:58 2011
@@ -109,17 +109,6 @@
} while (0)
/*
- * static inline routine to make obtaining ticks per second easier.
- */
-
-static inline uint32_t get_ticks_per_second( void )
-{
- rtems_interval ticks_per_second;
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second;
-}
-
-
-/*
* This allows us to view the "Test_task" instantiations as a set
* of numbered tasks by eliminating the number of application
* tasks created.
diff -u examples-v2/classic_api/triple_period/tasks.c:1.1 examples-v2/classic_api/triple_period/tasks.c:1.2
--- examples-v2/classic_api/triple_period/tasks.c:1.1 Thu Aug 6 15:25:58 2009
+++ examples-v2/classic_api/triple_period/tasks.c Mon Jun 13 09:18:58 2011
@@ -43,7 +43,7 @@
rtems_cpu_usage_reset();
while( 1 ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ status = rtems_clock_get_tod( &time );
count++;
// sets end criteria for demo application (60 seconds)
@@ -57,8 +57,8 @@
"absolute time (rtems_task_wake_when)\n",
PERIOD_TASK_ABSOLUTE
);
- print_time( " - rtems_clock_get - ", &time, "\n" );
- rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks_since_boot );
+ print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
printf(" - Ticks since boot: %" PRIu32 "\n", ticks_since_boot);
rtems_time_of_day time;
@@ -101,12 +101,12 @@
count = 0;
while( 1 ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ status = rtems_clock_get_tod( &time );
count++;
printf( "\n\nTask 2 - activating every %d second using rate monotonic manager to schedule (rtems_rate_monotonic_period)\n", PERIOD_TASK_RATE_MONOTONIC);
- print_time( " - rtems_clock_get - ", &time, "\n" );
- rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks_since_boot );
+ print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
printf(" - Ticks since boot: %" PRIu32 "\n", ticks_since_boot);
if( TRUE != is_RM_created ) {
@@ -117,8 +117,11 @@
printf("RM failed with status: %d\n", status);
exit(1);
}
- // Initiate RM periode
- status = rtems_rate_monotonic_period( RM_period, get_ticks_per_second() * PERIOD_TASK_RATE_MONOTONIC ); // Every N2 seconds
+ // Initiate RM period -- every N2 seconds
+ status = rtems_rate_monotonic_period(
+ RM_period,
+ rtems_clock_get_ticks_per_second() * PERIOD_TASK_RATE_MONOTONIC
+ );
if( RTEMS_SUCCESSFUL != status ) {
printf("RM failed with status: %d\n", status);
exit(1);
@@ -126,8 +129,11 @@
is_RM_created = TRUE;
}
- // Block until RM period has expired
- status = rtems_rate_monotonic_period( RM_period, get_ticks_per_second() * PERIOD_TASK_RATE_MONOTONIC ); // Every N2 seconds
+ // Block until RM period has expired -- every N2 seconds
+ status = rtems_rate_monotonic_period(
+ RM_period,
+ rtems_clock_get_ticks_per_second() * PERIOD_TASK_RATE_MONOTONIC
+ );
if( RTEMS_SUCCESSFUL != status ) {
if( RTEMS_TIMEOUT != status ) {
printf("RM missed period!\n");
@@ -157,14 +163,22 @@
uint32_t ticks_since_boot;
while( 1 ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ status = rtems_clock_get_tod( &time );
- printf( "\n\nTask 3 - activating after every %d second using relative time (rtems_task_wake_after)\n", PERIOD_TASK_RELATIVE);
- print_time( " - rtems_clock_get - ", &time, "\n" );
- rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks_since_boot );
- printf(" - Ticks since boot: %" PRIu32 "\n", ticks_since_boot); // Note how the ticks are drifting with this method
+ printf(
+ "\n\nTask 3 - activating after every %d second using relative "
+ "time (rtems_task_wake_after)\n",
+ PERIOD_TASK_RELATIVE
+ );
+ print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+ ticks_since_boot = rtems_clock_get_ticks_since_boot();
+ // Note how the ticks are drifting with this method
+ printf(" - Ticks since boot: %" PRIu32 "\n", ticks_since_boot);
- status = rtems_task_wake_after( get_ticks_per_second() * PERIOD_TASK_RELATIVE ); // Every N3 seconds
+ // Every N3 seconds
+ status = rtems_task_wake_after(
+ rtems_clock_get_ticks_per_second() * PERIOD_TASK_RELATIVE
+ );
}
}
*joel*:
2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
* ratemon_cond_server/test.c: Eliminate use of obsolete
rtems_clock_get().
M 1.14 led/ChangeLog
M 1.3 led/ratemon_cond_server/test.c
diff -u examples-v2/led/ChangeLog:1.13 examples-v2/led/ChangeLog:1.14
--- examples-v2/led/ChangeLog:1.13 Fri Apr 1 13:11:36 2011
+++ examples-v2/led/ChangeLog Mon Jun 13 09:19:01 2011
@@ -1,3 +1,8 @@
+2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * ratemon_cond_server/test.c: Eliminate use of obsolete
+ rtems_clock_get().
+
2011-04-01 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile: Update to account for movement of .cfg files.
diff -u examples-v2/led/ratemon_cond_server/test.c:1.2 examples-v2/led/ratemon_cond_server/test.c:1.3
--- examples-v2/led/ratemon_cond_server/test.c:1.2 Thu Dec 17 14:09:11 2009
+++ examples-v2/led/ratemon_cond_server/test.c Mon Jun 13 09:19:01 2011
@@ -73,7 +73,7 @@
if ( rt_status )
fprintf( stderr, "Period - did not work (%d)\n", rt_status );
- ticks = get_ticks_per_second();
+ ticks = rtems_clock_get_ticks_per_second();
for ( ; ; ) {
*joel*:
2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
* low_ticker/init.c, ticker/init.c: Eliminate use of obsolete
rtems_clock_get().
M 1.4 ticker/ChangeLog
M 1.2 ticker/low_ticker/init.c
M 1.3 ticker/ticker/init.c
diff -u examples-v2/ticker/ChangeLog:1.3 examples-v2/ticker/ChangeLog:1.4
--- examples-v2/ticker/ChangeLog:1.3 Fri Apr 1 13:11:42 2011
+++ examples-v2/ticker/ChangeLog Mon Jun 13 09:19:05 2011
@@ -1,3 +1,8 @@
+2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * low_ticker/init.c, ticker/init.c: Eliminate use of obsolete
+ rtems_clock_get().
+
2011-04-01 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile: Update to account for movement of .cfg files.
diff -u examples-v2/ticker/low_ticker/init.c:1.1 examples-v2/ticker/low_ticker/init.c:1.2
--- examples-v2/ticker/low_ticker/init.c:1.1 Thu Aug 6 15:25:58 2009
+++ examples-v2/ticker/low_ticker/init.c Mon Jun 13 09:19:05 2011
@@ -27,11 +27,12 @@
rtems_shutdown_executive( 0 );
}
printk( "TA%d %s%02d:%02d:%02d %02d/%02d/%04d\n",
- task_index, " - rtems_clock_get - ",
+ task_index, " - rtems_clock_get_tod - ",
(int) time.hour, (int) time.minute, (int) time.second,
(int) time.month, (int) time.day, (int) time.year );
status = rtems_task_wake_after(
- task_index * 5 * rtems_clock_get_ticks_per_second() );
+ task_index * 5 * rtems_clock_get_ticks_per_second()
+ );
}
}
diff -u examples-v2/ticker/ticker/init.c:1.2 examples-v2/ticker/ticker/init.c:1.3
--- examples-v2/ticker/ticker/init.c:1.2 Tue Oct 6 16:46:29 2009
+++ examples-v2/ticker/ticker/init.c Mon Jun 13 09:19:05 2011
@@ -31,14 +31,16 @@
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
task_index = task_number( tid );
for ( ; ; ) {
- status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
+ status = rtems_clock_get_tod( &time );
if ( time.second >= 35 ) {
puts( "*** END OF CLOCK TICK TEST ***" );
exit( 0 );
}
put_name( Task_name[ task_index ], FALSE );
- print_time( " - rtems_clock_get - ", &time, "\n" );
- status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second() );
+ print_time( " - rtems_clock_get_tod - ", &time, "\n" );
+ status = rtems_task_wake_after(
+ task_index * 5 * rtems_clock_get_ticks_per_second()
+ );
}
}
*joel*:
2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
* testmacros.h: Eliminate use of obsolete rtems_clock_get().
M 1.6 ChangeLog
M 1.2 testmacros.h
diff -u examples-v2/ChangeLog:1.5 examples-v2/ChangeLog:1.6
--- examples-v2/ChangeLog:1.5 Fri Apr 1 13:11:46 2011
+++ examples-v2/ChangeLog Mon Jun 13 09:19:07 2011
@@ -1,3 +1,7 @@
+2011-06-13 Joel Sherrill <joel.sherrill at oarcorp.com>
+
+ * testmacros.h: Eliminate use of obsolete rtems_clock_get().
+
2011-04-01 Joel Sherrill <joel.sherrill at oarcorp.com>
* Makefile: Update to account for movement of .cfg files.
diff -u examples-v2/testmacros.h:1.1 examples-v2/testmacros.h:1.2
--- examples-v2/testmacros.h:1.1 Thu Aug 6 15:25:58 2009
+++ examples-v2/testmacros.h Mon Jun 13 09:19:07 2011
@@ -53,17 +53,6 @@
} while (0)
/*
- * static inline routine to make obtaining ticks per second easier.
- */
-
-static inline uint32_t get_ticks_per_second( void )
-{
- rtems_interval ticks_per_second;
- (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second ); return ticks_per_second;
-}
-
-
-/*
* This allows us to view the "Test_task" instantiations as a set
* of numbered tasks by eliminating the number of application
* tasks created.
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110613/3f0c328f/attachment.html>
More information about the vc
mailing list