[PATCH] patch for _Timespec_To_ticks

Gedare Bloom gedare at gwmail.gwu.edu
Mon Aug 8 17:30:12 UTC 2011


I don't understand what you are asking. Also, this mailing list is
primarily for postings to the bugzilla. If you are asking a general
question it should probably be on the main rtems-users ml. If this
question pertains to a specific bug, you should use the bugzilla
interface.

On Mon, Aug 8, 2011 at 10:38 AM, Jie Liu <lj8175 at gmail.com> wrote:
> Hi,
>
> This is found in the gcj porting, which use pthread_cond_timedwait for
> the sleep().
> The test case before add this patch and output can be seen:
> http://code.google.com/p/rtemsgcj/source/browse/trunk/algorithm/20110808javaSleep/?r=123
>
> And after the patch, the test case and output can be seen:
> http://code.google.com/p/rtemsgcj/source/browse/trunk/algorithm/20110808javaSleep/?r=124
>
> But there appears to be still a tick missed, could you tell me why ?
>
> Index: cpukit/score/src/timespectoticks.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/cpukit/score/src/timespectoticks.c,v
> retrieving revision 1.3
> diff -r1.3 timespectoticks.c
> 45a46,53
>>   /**
>>    * We should ensure the ticks not be truncated by intenger division
>>    * And ticks add 1 seems not enough..
>>    */
>>
>>   if ( (time->tv_nsec % rtems_configuration_get_nanoseconds_per_tick()) != 0)
>>     ticks ++;
>>
> 48,49d55
> <
> <   return 1;
>
> Thanks,
> Jie
> _______________________________________________
> rtems-bugs mailing list
> rtems-bugs at rtems.org
> http://rtems.org/mailman/listinfo/rtems-bugs
>




More information about the bugs mailing list