summaryrefslogtreecommitdiff
path: root/innobase/os/os0proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/os/os0proc.c')
-rw-r--r--innobase/os/os0proc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/innobase/os/os0proc.c b/innobase/os/os0proc.c
index 43a2db4d306..1ee448a4a44 100644
--- a/innobase/os/os0proc.c
+++ b/innobase/os/os0proc.c
@@ -19,6 +19,23 @@ Created 9/30/1995 Heikki Tuuri
#include "ut0mem.h"
/********************************************************************
+Converts the current process id to a number. It is not guaranteed that the
+number is unique. In Linux returns the 'process number' of the current
+thread. That number is the same as one sees in 'top', for example. In Linux
+the thread id is not the same as one sees in 'top'. */
+
+ulint
+os_proc_get_number(void)
+/*====================*/
+{
+#ifdef __WIN__
+ return((ulint)GetCurrentProcessId());
+#else
+ return((ulint)getpid());
+#endif
+}
+
+/********************************************************************
Allocates non-cacheable memory. */
void*