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

Function fdfree

freebsd/kern/kern_descrip.c:305–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305static inline void
306fdfree(struct filedesc *fdp, int fd)
307{
308 struct filedescent *fde;
309
310 FILEDESC_XLOCK_ASSERT(fdp);
311 fde = &fdp->fd_ofiles[fd];
312#ifdef CAPABILITIES
313 seqc_write_begin(&fde->fde_seqc);
314#endif
315 fde->fde_file = NULL;
316#ifdef CAPABILITIES
317 seqc_write_end(&fde->fde_seqc);
318#endif
319 fdefree_last(fde);
320 fdunused(fdp, fd);
321}
322
323/*
324 * System calls on descriptors.

Callers 5

kern_closeFunction · 0.85
kern_close_rangeFunction · 0.85
fdsetugidsafetyFunction · 0.85
fdcloseFunction · 0.85
fdcloseexecFunction · 0.85

Calls 4

seqc_write_beginFunction · 0.85
seqc_write_endFunction · 0.85
fdefree_lastFunction · 0.85
fdunusedFunction · 0.85

Tested by

no test coverage detected