summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-26 19:51:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-27 08:54:38 +0100
commit9da29bdc19b7135c5141cde7ae463101e3d4d69b (patch)
tree97280a81a2c7545607a011d018b2b354d9365bcc /sal
parent4895e01dee323d97d5573a6a2ff4696c3e7bcd25 (diff)
Hide parts of sal/osl/unx/thread.cxx only used by !NO_PTHREAD_PRIORITY
(to silence upcoming loplugin:unusedmember) Change-Id: I86e340e6ade043e020609f0f4da58ba94be6ab1b Reviewed-on: https://gerrit.libreoffice.org/83817 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/thread.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index fb694ebd92cd..b47e13bf49ed 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -88,6 +88,7 @@ typedef struct osl_thread_impl_st
pthread_cond_t m_Cond;
} Thread_Impl;
+#if !defined NO_PTHREAD_PRIORITY
struct osl_thread_priority_st
{
int m_Highest;
@@ -96,10 +97,14 @@ struct osl_thread_priority_st
int m_Below_Normal;
int m_Lowest;
};
+#endif
}
+#if !defined NO_PTHREAD_PRIORITY
#define OSL_THREAD_PRIORITY_INITIALIZER { 127, 96, 64, 32, 0 }
+#endif
+
static void osl_thread_priority_init_Impl();
namespace {
@@ -120,7 +125,9 @@ namespace {
struct osl_thread_global_st
{
pthread_once_t m_once;
+#if !defined NO_PTHREAD_PRIORITY
struct osl_thread_priority_st m_priority;
+#endif
struct osl_thread_textencoding_st m_textencoding;
};
@@ -129,7 +136,9 @@ struct osl_thread_global_st
static struct osl_thread_global_st g_thread =
{
PTHREAD_ONCE_INIT,
+#if !defined NO_PTHREAD_PRIORITY
OSL_THREAD_PRIORITY_INITIALIZER,
+#endif
OSL_THREAD_TEXTENCODING_INITIALIZER
};