-/*
- * del_fd
- *
- * Remove a fd from the global list protected by a mutex
- */
-static void del_fd(struct ltt_kconsumerd_fd *lcf)
-{
- pthread_mutex_lock(&kconsumerd_lock_fds);
- cds_list_del(&lcf->list);
- if (fds_count > 0) {
- fds_count--;
- DBG("Removed ltt_kconsumerd_fd");
- cleanup_kconsumerd_fd(lcf);
- }
- pthread_mutex_unlock(&kconsumerd_lock_fds);
-}
-
-/*
- * close_outfds
- *
- * Close all fds in the previous fd_list
- * Must be used with kconsumerd_lock_fds lock held
- */
-static void close_outfds()
-{
- struct ltt_kconsumerd_fd *iter;
- cds_list_for_each_entry(iter, &kconsumerd_fd_list.head, list) {
- del_fd(iter);
- }
-}