summaryrefslogtreecommitdiff
path: root/lib/igt_thread.h
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-06-16 15:37:03 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-06-22 13:26:41 +0300
commitb787a2f2a0a56e2009f7b8252d93b3a8694f0b53 (patch)
treecda4f15bfb089b7506e2174162314f845fb83eb7 /lib/igt_thread.h
parentf0ade50caf38574592886f55bb03cf80c574bb83 (diff)
lib/core: Print thread:tid with igt_log for non-main threads
So that we know what's the source of messages. igt_thread.c is created to facilitate more threading-related functionality that will come in the following patch. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_thread.h')
-rw-r--r--lib/igt_thread.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/igt_thread.h b/lib/igt_thread.h
new file mode 100644
index 00000000..b16f803f
--- /dev/null
+++ b/lib/igt_thread.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+bool igt_thread_is_main(void);