[Olsr-dev] olsr strange behaving / nearly no outgoing packets [partly solved]
Henning Rogge
(spam-protected)
Mon Aug 13 10:12:02 CEST 2012
On 08/12/2012 09:41 PM, Lars Kruse wrote:
> Hi Ferry,
>
> thanks for taking a look at it!
>
>> does this line fix it?
>>> return (tv.tv_sec - first_tv.tv_sec) * (__time_t)1000 + (tv.tv_usec -
>>> first_tv.tv_usec) / (__suseconds_t)1000;
>
> sadly no - this does not fix the problem :(
>
> To me it feels like this is a compiler problem, or? (works without -Os)
> Could someone give me some specific hints how to get the machine code for the
> line above? This would probably help us to understand the source of the problem.
This feels like a compiler problem.
> Besides this approach I don't see any other options for further investigations.
> Or what would you say?
Maybe we could just add a new variable and calculate the return value in
two steps. Most compilers should optimize the variable away anyways.
uint32_t ms;
....
t = (tv.tv_sec - first_tv.tv_sec) * 1000;
ms = (tv.tv_usec - first_tv.tv_usec) / 1000;
return t + ms;
}
Does this help ?
Henning Rogge
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120813/8ccfaf8d/attachment.bin>
More information about the Olsr-dev
mailing list