summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-25 00:53:48 +0000
committerdim <dim@FreeBSD.org>2013-12-25 00:53:48 +0000
commit6978c9a48502746672016b2c945cc94ab7b1d1ae (patch)
tree48d8e305832d336e6253a2364679bad45aec625a /usr.bin
parentd51fec81332f36aec4c0836cfc2ba9861b7e7c93 (diff)
downloadFreeBSD-src-6978c9a48502746672016b2c945cc94ab7b1d1ae.zip
FreeBSD-src-6978c9a48502746672016b2c945cc94ab7b1d1ae.tar.gz
MFC r259740:
In usr.bin/sort/radixsort.c, pop_ls_mt() is only referenced if SORT_THREADS is defined, so make the whole function conditional, instead of just the pthread calls in it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sort/radixsort.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/sort/radixsort.c b/usr.bin/sort/radixsort.c
index fde2b6f..f6cf6ac 100644
--- a/usr.bin/sort/radixsort.c
+++ b/usr.bin/sort/radixsort.c
@@ -171,6 +171,8 @@ pop_ls_st(void)
return (sl);
}
+#if defined(SORT_THREADS)
+
/*
* Pop sort level from the stack (multi-threaded style)
*/
@@ -180,9 +182,7 @@ pop_ls_mt(void)
struct level_stack *saved_ls;
struct sort_level *sl;
-#if defined(SORT_THREADS)
pthread_mutex_lock(&g_ls_mutex);
-#endif
if (g_ls) {
sl = g_ls->sl;
@@ -193,15 +193,15 @@ pop_ls_mt(void)
saved_ls = NULL;
}
-#if defined(SORT_THREADS)
pthread_mutex_unlock(&g_ls_mutex);
-#endif
sort_free(saved_ls);
return (sl);
}
+#endif /* defined(SORT_THREADS) */
+
static void
add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx)
{
OpenPOWER on IntegriCloud