| 431 | } |
| 432 | |
| 433 | static int |
| 434 | giant_read(struct cdev *dev, struct uio *uio, int ioflag) |
| 435 | { |
| 436 | struct cdevsw *dsw; |
| 437 | int ref, retval; |
| 438 | |
| 439 | dsw = dev_refthread(dev, &ref); |
| 440 | if (dsw == NULL) |
| 441 | return (ENXIO); |
| 442 | mtx_lock(&Giant); |
| 443 | retval = dsw->d_gianttrick->d_read(dev, uio, ioflag); |
| 444 | mtx_unlock(&Giant); |
| 445 | dev_relthread(dev, ref); |
| 446 | return (retval); |
| 447 | } |
| 448 | |
| 449 | static int |
| 450 | giant_write(struct cdev *dev, struct uio *uio, int ioflag) |
nothing calls this directly
no test coverage detected