MCPcopy Create free account
hub / github.com/F-Stack/f-stack / unp_restore_undead_ref

Function unp_restore_undead_ref

freebsd/kern/uipc_usrreq.c:2582–2605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2580}
2581
2582static void
2583unp_restore_undead_ref(struct filedescent **fdep, int fdcount)
2584{
2585 struct unpcb *unp;
2586 struct file *fp;
2587 int i;
2588
2589 /*
2590 * This function can only be called from the gc task.
2591 */
2592 KASSERT(taskqueue_member(taskqueue_thread, curthread) != 0,
2593 ("%s: not on gc callout", __func__));
2594 UNP_LINK_LOCK_ASSERT();
2595
2596 for (i = 0; i < fdcount; i++) {
2597 fp = fdep[i]->fde_file;
2598 if ((unp = fptounp(fp)) == NULL)
2599 continue;
2600 if ((unp->unp_gcflag & UNPGC_DEAD) == 0)
2601 continue;
2602 unp->unp_gcrefs++;
2603 unp_marked++;
2604 }
2605}
2606
2607static void
2608unp_gc_scan(struct unpcb *unp, void (*op)(struct filedescent **, int))

Callers

nothing calls this directly

Calls 2

taskqueue_memberFunction · 0.85
fptounpFunction · 0.85

Tested by

no test coverage detected