This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, I have a problem when using "nanosleep()". I want to sleep for 20 ms, so I call nanosleep() with 20.000.000 ns. My system tick is 10 ms. Result is : the thread is sent to sleep during 30 ms... I tried to trace the problem, adding traces (diag_printf) in function cyg_timespec_to_ticks() (/compat/posix/<version>/time.cxx), to output the result (number of ticks) to the console. When called with 20.000.000 ns, this function returns 3 ticks, which is wrong. When traces are added to this function, in "if (roundup)..." the result is ok : 2 ticks. I can't figure the origin of this problem. bug compiler ? mismanagement of cache ? thanks for helping. Bruno Aubert.
Attachment:
Faiveley_Disclaimer.txt
Description: Text document
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |