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

Function device_quiesce

freebsd/kern/subr_bus.c:3052–3062  ·  view source on GitHub ↗

* @brief Tells a driver to quiesce itself. * * This function is a wrapper around the DEVICE_QUIESCE() driver * method. If the call to DEVICE_QUIESCE() succeeds. * * @param dev the device to quiesce * * @retval 0 success * @retval ENXIO no driver was found * @retval ENOMEM memory allocation failure * @retval non-zero some other unix error code */

Source from the content-addressed store, hash-verified

3050 * @retval non-zero some other unix error code
3051 */
3052int
3053device_quiesce(device_t dev)
3054{
3055 PDEBUG(("%s", DEVICENAME(dev)));
3056 if (dev->state == DS_BUSY)
3057 return (EBUSY);
3058 if (dev->state != DS_ATTACHED)
3059 return (0);
3060
3061 return (DEVICE_QUIESCE(dev));
3062}
3063
3064/**
3065 * @brief Notify a device of system shutdown

Callers 2

devclass_quiesce_driverFunction · 0.85
devctl2_ioctlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected