diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2009-11-17 16:47:41 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2010-01-03 17:37:20 +0200 |
commit | 702b92cdb80eac8fd3b5da3a96bfcfa622f7c7af (patch) | |
tree | 4151f7b93875285fdbedfe0fdb5639f5fff154c2 /client/x11 | |
parent | 18270e02353786a64e01a303ac4db5fa05e05eeb (diff) | |
download | spice-702b92cdb80eac8fd3b5da3a96bfcfa622f7c7af.tar.gz spice-702b92cdb80eac8fd3b5da3a96bfcfa622f7c7af.tar.xz spice-702b92cdb80eac8fd3b5da3a96bfcfa622f7c7af.zip |
spice: add [pid:tid] to log lines
Diffstat (limited to 'client/x11')
-rw-r--r-- | client/x11/platform.cpp | 11 |
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); |