< prev index next >
src/share/vm/runtime/os.hpp
Print this page
rev 10311 : 8148425: strerror() function is not thread-safe
Reviewed-by:
*** 615,624 ****
--- 615,633 ----
static void print_location(outputStream* st, intptr_t x, bool verbose = false);
static size_t lasterror(char *buf, size_t len);
static int get_last_error();
+ // Replacement for strerror().
+ // Will return the literalized version of the errno (e.g. "EINVAL" for EINVAL)
+ // for short_text = true. Will return the english description of the error
+ // (e.g. "File not found", as described in the POSIX standard, for
+ // short_text = false. Will return "unknown" for unknown errno values,
+ // regardless of the value of short_text.
+ // All returned strings are static constants and always valid.
+ static const char* strerror(int e, bool short_text = true);
+
// Determines whether the calling process is being debugged by a user-mode debugger.
static bool is_debugger_attached();
// wait for a key press if PauseAtExit is set
static void wait_for_keypress_at_exit(void);
< prev index next >