Add devctl_process_running() so that power management system driver

can check whether devd(8) is running.

MFC after:	1 week
This commit is contained in:
Mitsuru IWASAKI 2008-01-27 16:06:37 +00:00
parent a4b8759227
commit 4f7f6238af
2 changed files with 10 additions and 0 deletions

View File

@ -508,6 +508,15 @@ devpoll(struct cdev *dev, int events, d_thread_t *td)
return (revents);
}
/**
* @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
*

View File

@ -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);