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
This commit is contained in:
parent
299e547f97
commit
77f98fbb7d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259740
@ -171,6 +171,8 @@ pop_ls_st(void)
|
|||||||
return (sl);
|
return (sl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(SORT_THREADS)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pop sort level from the stack (multi-threaded style)
|
* Pop sort level from the stack (multi-threaded style)
|
||||||
*/
|
*/
|
||||||
@ -180,9 +182,7 @@ pop_ls_mt(void)
|
|||||||
struct level_stack *saved_ls;
|
struct level_stack *saved_ls;
|
||||||
struct sort_level *sl;
|
struct sort_level *sl;
|
||||||
|
|
||||||
#if defined(SORT_THREADS)
|
|
||||||
pthread_mutex_lock(&g_ls_mutex);
|
pthread_mutex_lock(&g_ls_mutex);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_ls) {
|
if (g_ls) {
|
||||||
sl = g_ls->sl;
|
sl = g_ls->sl;
|
||||||
@ -193,15 +193,15 @@ pop_ls_mt(void)
|
|||||||
saved_ls = NULL;
|
saved_ls = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SORT_THREADS)
|
|
||||||
pthread_mutex_unlock(&g_ls_mutex);
|
pthread_mutex_unlock(&g_ls_mutex);
|
||||||
#endif
|
|
||||||
|
|
||||||
sort_free(saved_ls);
|
sort_free(saved_ls);
|
||||||
|
|
||||||
return (sl);
|
return (sl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* defined(SORT_THREADS) */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx)
|
add_to_sublevel(struct sort_level *sl, struct sort_list_item *item, size_t indx)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user