summaryrefslogtreecommitdiff
path: root/src/libnsss/nsss_switch_endspent.c
blob: 0bf5b928e71db5cb86fbdad8789f35de1446facd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <pthread.h>

#include <nsss/shadow-switch.h>
#include "nsss-switch-internal.h"

void nsss_switch_endspent (void)
{
  pthread_mutex_lock(&nsss_switch_enumerator_mutex) ;
  nsss_switch_shadow_end(&nsss_switch_enumerator, 0, 0) ;
  nsss_switch_end(&nsss_switch_enumerator, NSSS_SWITCH_SHADOW) ;
  pthread_mutex_unlock(&nsss_switch_enumerator_mutex) ;
}