| 303 | } |
| 304 | |
| 305 | static inline void |
| 306 | fdfree(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. |
no test coverage detected