Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] thread proof/reentrance
While digging in the code:
msi:~/video/VDR# grep ctime *.c | grep -v ctime_r
eit.c: isyslog("System Time = %s (%ld)\n", ctime(&loctim), loctim);
eit.c: isyslog("Local Time = %s (%ld)\n", ctime(&sattim), sattim);
svdrp.c: char *s = ctime(&Start);
svdrp.c: Reply(220, "%s SVDRP VideoDiskRecorder %s; %s", buffer, VDRVERSION, ctime(&now));
vdr.c: dsyslog("next timer event at %s", ctime(&Next));
Is is ok not to use the reenttrant ctime_r in a multi threaded environment?
eit.c uses a mutex
But: what does this help as svdrp.c and vdr.c seems not to use a mutex
(and: does the mutex really globally lock the access to all clib calls?)
or someone forgot to ask for the clib-mutex (if there is such a mutex)?)
May that never cause "funny" time results?
(Mostly it does not matter, as all threads are having the same time,
but sometimes?)
Rainer
Home |
Main Index |
Thread Index