Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/os.hpp @ 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 | 24fda36852ce |
children | 0fbdb4381b99 660978a2a31a |
comparison
equal
deleted
inserted
replaced
547:1e458753107d | 548:773234c55e8c |
---|---|
118 static double elapsedVTime(); | 118 static double elapsedVTime(); |
119 | 119 |
120 // Return current local time in a string (YYYY-MM-DD HH:MM:SS). | 120 // Return current local time in a string (YYYY-MM-DD HH:MM:SS). |
121 // It is MT safe, but not async-safe, as reading time zone | 121 // It is MT safe, but not async-safe, as reading time zone |
122 // information may require a lock on some platforms. | 122 // information may require a lock on some platforms. |
123 static char* local_time_string(char *buf, size_t buflen); | 123 static char* local_time_string(char *buf, size_t buflen); |
124 static struct tm* localtime_pd (const time_t* clock, struct tm* res); | |
124 // Fill in buffer with current local time as an ISO-8601 string. | 125 // Fill in buffer with current local time as an ISO-8601 string. |
125 // E.g., YYYY-MM-DDThh:mm:ss.mmm+zzzz. | 126 // E.g., YYYY-MM-DDThh:mm:ss.mmm+zzzz. |
126 // Returns buffer, or NULL if it failed. | 127 // Returns buffer, or NULL if it failed. |
127 static char* iso8601_time(char* buffer, size_t buffer_length); | 128 static char* iso8601_time(char* buffer, size_t buffer_length); |
128 | 129 |