Hi C/C++ Programmers

Microsoft does not provide thread-safe time functions for
localtime(), gmtime(), ctime() and asctime().

File: ./XalanEXSLT/XalanEXSLTDateTime.cpp

This file creates localtime_r() and gmtime_r() for Windows systems.

The implementation does not look thread-safe unless either a
CRITICAL_SECTION object or a PTHREAD_MUTEX object is used to
synchronize threads in a multi-threaded system.

Functions: localtime(), gmtime(), ctime(), and asctime() return
pointers to static structures, and as a result are not thread-safe.

For the case of: struct tm,

   *res = *tmpTime

C++ implies a structure copy.  Is this structure copy by assignment an
atomic operation?

Sincerely,
Steven J. Hathaway



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org
For additional commands, e-mail: xalan-dev-h...@xml.apache.org

Reply via email to