Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Dec 2013 20:46:32 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259740 - head/usr.bin/sort
Message-ID:  <201312222046.rBMKkWgZ021948@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Dec 22 20:46:31 2013
New Revision: 259740
URL: http://svnweb.freebsd.org/changeset/base/259740

Log:
  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.
  
  MFC after:	3 days

Modified:
  head/usr.bin/sort/radixsort.c

Modified: head/usr.bin/sort/radixsort.c
==============================================================================
--- head/usr.bin/sort/radixsort.c	Sun Dec 22 20:40:56 2013	(r259739)
+++ head/usr.bin/sort/radixsort.c	Sun Dec 22 20:46:31 2013	(r259740)
@@ -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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312222046.rBMKkWgZ021948>