summaryrefslogtreecommitdiffstats
path: root/client/x11/platform.cpp
diff options
context:
space:
mode:
authorArnon Gilboa <agilboa@redhat.com>2009-11-17 16:47:41 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-11-18 13:36:43 +0200
commit56eb1acb9e7792faedf8c23d4e1435f1ec2b36b8 (patch)
tree546a16c898146ac6cd7db01ea871ba0886426443 /client/x11/platform.cpp
parent8b36ed546068bd365c1345f937f3b26cd2b7d0d4 (diff)
downloadspice-56eb1acb9e7792faedf8c23d4e1435f1ec2b36b8.tar.gz
spice-56eb1acb9e7792faedf8c23d4e1435f1ec2b36b8.tar.xz
spice-56eb1acb9e7792faedf8c23d4e1435f1ec2b36b8.zip
spice: add [pid:tid] to log lines
Diffstat (limited to 'client/x11/platform.cpp')
-rw-r--r--client/x11/platform.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index 10d621ba..217664a4 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -223,6 +223,17 @@ void Platform::get_temp_dir(std::string& path)
path = "/tmp/";
}
+uint64_t Platform::get_process_id()
+{
+ static uint64_t pid = uint64_t(getpid());
+ return pid;
+}
+
+uint64_t Platform::get_thread_id()
+{
+ return uint64_t(syscall(SYS_gettid));
+}
+
void Platform::msleep(unsigned int millisec)
{
usleep(millisec * 1000);