static void *
vwk_init(void)
{
	struct vwk *vwk;

	ALLOC_OBJ(vwk, VWK_MAGIC);
	AN(vwk);

	VTAILQ_INIT(&vwk->sesshead);
	AZ(pipe(vwk->pipes));

	AZ(VFIL_nonblocking(vwk->pipes[0]));
	AZ(VFIL_nonblocking(vwk->pipes[1]));

	AZ(pthread_create(&vwk->thread, NULL, vwk_thread, vwk));
	return (vwk);
}
static void *
vwe_init(void)
{
	struct vwe *vwe;

	ALLOC_OBJ(vwe, VWE_MAGIC);
	AN(vwe);
	VTAILQ_INIT(&vwe->sesshead);
	AZ(pipe(vwe->pipes));
	AZ(pipe(vwe->timer_pipes));

	AZ(VFIL_nonblocking(vwe->pipes[0]));
	AZ(VFIL_nonblocking(vwe->pipes[1]));
	AZ(VFIL_nonblocking(vwe->timer_pipes[0]));

	AZ(pthread_create(&vwe->timer_thread,
	    NULL, vwe_timeout_idle_ticker, vwe));
	AZ(pthread_create(&vwe->epoll_thread, NULL, vwe_thread, vwe));
	return(vwe);
}