Mercurial > hg > truffle
comparison src/os/linux/vm/os_linux.cpp @ 548:773234c55e8c
6800586: -XX:+PrintGCDateStamps is using mt-unsafe localtime function
Summary: replaced localtime() with localtime_r() on Solaris and Linux.
Reviewed-by: apetrusenko, dholmes, jmasa
author | ysr |
---|---|
date | Mon, 09 Feb 2009 12:26:05 -0800 |
parents | fc7ab6287598 |
children | 0fbdb4381b99 660978a2a31a |
comparison
equal
deleted
inserted
replaced
547:1e458753107d | 548:773234c55e8c |
---|---|
1428 localtime_r(&long_time, &t); | 1428 localtime_r(&long_time, &t); |
1429 jio_snprintf(buf, buflen, "%d-%02d-%02d %02d:%02d:%02d", | 1429 jio_snprintf(buf, buflen, "%d-%02d-%02d %02d:%02d:%02d", |
1430 t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, | 1430 t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, |
1431 t.tm_hour, t.tm_min, t.tm_sec); | 1431 t.tm_hour, t.tm_min, t.tm_sec); |
1432 return buf; | 1432 return buf; |
1433 } | |
1434 | |
1435 struct tm* os::localtime_pd(const time_t* clock, struct tm* res) { | |
1436 return localtime_r(clock, res); | |
1433 } | 1437 } |
1434 | 1438 |
1435 //////////////////////////////////////////////////////////////////////////////// | 1439 //////////////////////////////////////////////////////////////////////////////// |
1436 // runtime exit support | 1440 // runtime exit support |
1437 | 1441 |