Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - clock_gettime multithreaded ?: Page 1 of 6 (6 Items)
   
clock_gettime multithreaded ?  
Hy 

since some weeks I have a problem with getting the Realtimeclock values by "clock_gettime". Sometimes I gets a timevalue
 back which is not a correct one. 
The system on which the software is running is a X86 plattform with a dualcore prozessor with multiple threads. Cause of
 timing issues it would be possible that

these calls ->

coBindCpu_m.vfuBindCpu(0);
lRetVal_l = clock_gettime( CLOCK_REALTIME, &tActTimeSpec_l);
coBindCpu_m.vfuRestoreCpu();

is done in parallel. 

Is it possible that the function clock_gettime is not threadsafe or that it has the same problem like fopen, fclose ... 
in a multithreaded environment?

Best regards
Dieter