mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Made several functions threadsafe (cont'd)
This commit is contained in:
39
HISTORY
39
HISTORY
@@ -3160,7 +3160,7 @@ Video Disk Recorder Revision History
|
||||
right day of week for timers in the future.
|
||||
- Some improvements to cPoller (thanks to Marco Schl<68><6C>ler).
|
||||
|
||||
2004-12-24: Version 1.3.18
|
||||
2004-12-26: Version 1.3.18
|
||||
|
||||
- Removed an unused variable from cTimer::GetWDayFromMDay() (thanks to Wayne Keer
|
||||
for reporting this one).
|
||||
@@ -3215,12 +3215,37 @@ Video Disk Recorder Revision History
|
||||
the actual buffering. In particular these are:
|
||||
readdir() -> cReadDir
|
||||
readline() -> cReadLine
|
||||
strescape() -> cStrEscape
|
||||
AddDirectory() -> cAddDirectory
|
||||
ctime() -> cCtime
|
||||
itoa() -> cItoa
|
||||
WeekDayName() -> cWeekDayName
|
||||
DayDateTime() -> cDayDateTime
|
||||
- Several formerly non-threadsafe functions now have a return type of cString:
|
||||
cChannel::ToText()
|
||||
tChannelID::ToString()
|
||||
cEvent::GetDateString()
|
||||
cEvent::GetTimeString()
|
||||
cEvent::GetEndTimeString()
|
||||
cEvent::GetVpsString()
|
||||
cMark::ToText()
|
||||
cTimer::ToText()
|
||||
cSource::ToString()
|
||||
cTimer::PrintDay()
|
||||
cTimer::PrintFirstDay()
|
||||
PrefixVideoFileName()
|
||||
IndexToHMSF()
|
||||
ChannelString()
|
||||
strescape()
|
||||
AddDirectory()
|
||||
itoa()
|
||||
WeekDayName()
|
||||
DayDateTime()
|
||||
When using these functions in a 'const char *' context there is nothing special
|
||||
to consider, except that you can no longer have a pointer to the return value,
|
||||
as in
|
||||
const char *date = DayDateTime();
|
||||
Although this will compile without error message, the resulting 'date' will not
|
||||
be valid after this line. Use this instead:
|
||||
cString date = DayDateTime();
|
||||
In a 'const void *' context (as in printf() etc.) the result needs to be
|
||||
dereferenced with a '*', as in
|
||||
printf("%s", *DayDateTime());
|
||||
to make it a 'const char *'.
|
||||
- Removed delay_ms(), using cCondWait::SleepMs() instead.
|
||||
- Replaced time_ms() with a threadsafe and non-overflowing cTimeMs (thanks to Rainer
|
||||
Zocholl for pointing out this problem).
|
||||
|
Reference in New Issue
Block a user