-/* $OpenBSD: rasops.c,v 1.36 2014/12/19 22:44:58 guenther Exp $ */
+/* $OpenBSD: rasops.c,v 1.37 2014/12/22 20:08:05 krw Exp $ */
/* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */
/*-
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/time.h>
-#include <sys/workq.h>
+#include <sys/task.h>
#include <sys/endian.h>
#include <dev/wscons/wsdisplayvar.h>
ri->ri_ops.unpack_attr = rasops_vcons_unpack_attr;
}
+ task_set(&ri->ri_switchtask, rasops_doswitch, ri, NULL);
+
rasops_init_devcmap(ri);
return (0);
}
{
struct rasops_info *ri = v;
+ ri->ri_switchcookie = cookie;
if (cb) {
ri->ri_switchcb = cb;
ri->ri_switchcbarg = cbarg;
- workq_queue_task(NULL, &ri->ri_switchwqt, 0,
- rasops_doswitch, v, cookie);
+ task_add(systq, &ri->ri_switchtask);
return (EAGAIN);
}
- rasops_doswitch(v, cookie);
+ rasops_doswitch(ri, NULL);
return (0);
}
void
-rasops_doswitch(void *v, void *cookie)
+rasops_doswitch(void *v, void *dummy)
{
struct rasops_info *ri = v;
- struct rasops_screen *scr = cookie;
+ struct rasops_screen *scr = ri->ri_switchcookie;
int row, col;
long attr;
-/* $OpenBSD: rasops.h,v 1.15 2013/10/20 21:24:00 miod Exp $ */
+/* $OpenBSD: rasops.h,v 1.16 2014/12/22 20:08:05 krw Exp $ */
/* $NetBSD: rasops.h,v 1.13 2000/06/13 13:36:54 ad Exp $ */
/*-
#ifndef _RASOPS_H_
#define _RASOPS_H_ 1
-#include <sys/workq.h>
+#include <sys/task.h>
#ifdef SMALL_KERNEL
#define RASOPS_SMALL
void (*ri_switchcb)(void *, int, int);
void *ri_switchcbarg;
- struct workq_task ri_switchwqt;
+ void *ri_switchcookie;
+ struct task ri_switchtask;
int (*ri_putchar)(void *, int, int, u_int, long);
int (*ri_copycols)(void *, int, int, int, int);