diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2008-01-27 16:06:37 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2008-01-27 16:06:37 +0000 |
commit | a9f086bbd3d0f139b7c5a606c20aecb2b0e028f9 (patch) | |
tree | af9de834c75802469cbcc48f619918a56a1b81b6 /sys | |
parent | 25cf2e216ff4e0dc970ed281507d3823519260e7 (diff) | |
download | FreeBSD-src-a9f086bbd3d0f139b7c5a606c20aecb2b0e028f9.zip FreeBSD-src-a9f086bbd3d0f139b7c5a606c20aecb2b0e028f9.tar.gz |
Add devctl_process_running() so that power management system driver
can check whether devd(8) is running.
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_bus.c | 9 | ||||
-rw-r--r-- | sys/sys/bus.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 89876d227..71924cc 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -509,6 +509,15 @@ devpoll(struct cdev *dev, int events, d_thread_t *td) } /** + * @brief Return whether the userland process is running + */ +boolean_t +devctl_process_running(void) +{ + return (devsoftc.async_proc != NULL); +} + +/** * @brief Queue data to be read from the devctl device * * Generic interface to queue data to the devctl device. It is diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 18f246e..1463437 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -83,6 +83,7 @@ struct u_device { * hook to send the message. However, devctl_queue_data is also * included in case devctl_notify isn't sufficiently general. */ +boolean_t devctl_process_running(void); void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); void devctl_queue_data(char *__data); |