-.\" $OpenBSD: task_add.9,v 1.12 2014/06/11 08:47:53 blambert Exp $
+.\" $OpenBSD: task_add.9,v 1.13 2015/01/27 03:17:35 dlg Exp $
.\"
.\" Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 11 2014 $
+.Dd $Mdocdate: January 27 2015 $
.Dt TASK_ADD 9
.Os
.Sh NAME
.Ft void
.Fn "taskq_destroy" "struct taskq *tq"
.Ft void
-.Fn "task_set" "struct task *t" "void (*fn)(void *, void *)" "void *arg1" "void *arg2"
+.Fn "task_set" "struct task *t" "void (*fn)(void *)" "void *arg"
.Ft int
.Fn "task_add" "struct taskq *tq" "struct task *t"
.Ft int
.Fn "task_del" "struct taskq *tq" "struct task *t"
.Vt extern struct taskq *const systq;
.Vt extern struct taskq *const systqmp;
-.Fn "TASK_INITIALIZER" "void (*fn)(void *, void *)" "void *arg1" "void *arg2"
+.Fn "TASK_INITIALIZER" "void (*fn)(void *)" "void *arg"
.Sh DESCRIPTION
The
taskq
.Fa t
will be prepared to call the function
.Fa fn
-with the arguments specified by
-.Fa arg1
-and
-.Fa arg2 .
+with the argument specified by
+.Fa arg .
Once initialised, the
.Fa t
structure can be used repeatedly in calls to
.Fa fn
argument with the
.Fa void *
-arguments given in
-.Fa arg1
-and
-.Fa arg2 .
+argument given in
+.Fa arg .
.Sh CONTEXT
.Fn taskq_create
and
-/* $OpenBSD: vdsp.c,v 1.36 2015/01/25 21:42:13 kettenis Exp $ */
+/* $OpenBSD: vdsp.c,v 1.37 2015/01/27 03:17:35 dlg Exp $ */
/*
* Copyright (c) 2009, 2011, 2014 Mark Kettenis
*
void vdsp_sendmsg(struct vdsp_softc *, void *, size_t, int dowait);
-void vdsp_open(void *, void *);
-void vdsp_close(void *, void *);
-void vdsp_alloc(void *, void *);
+void vdsp_open(void *);
+void vdsp_close(void *);
+void vdsp_alloc(void *);
void vdsp_readlabel(struct vdsp_softc *);
int vdsp_writelabel(struct vdsp_softc *);
int vdsp_is_iso(struct vdsp_softc *);
-void vdsp_read(void *, void *);
+void vdsp_read(void *);
void vdsp_read_desc(struct vdsp_softc *, struct vdsk_desc_msg *);
-void vdsp_vd_task(void *, void *);
+void vdsp_vd_task(void *);
void vdsp_read_dring(void *, void *);
void vdsp_write_dring(void *, void *);
void vdsp_flush_dring(void *, void *);
goto free_txqueue;
}
- task_set(&sc->sc_open_task, vdsp_open, sc, NULL);
- task_set(&sc->sc_alloc_task, vdsp_alloc, sc, NULL);
- task_set(&sc->sc_close_task, vdsp_close, sc, NULL);
- task_set(&sc->sc_read_task, vdsp_read, sc, NULL);
+ task_set(&sc->sc_open_task, vdsp_open, sc);
+ task_set(&sc->sc_alloc_task, vdsp_alloc, sc);
+ task_set(&sc->sc_close_task, vdsp_close, sc);
+ task_set(&sc->sc_read_task, vdsp_read, sc);
printf("\n");
}
void
-vdsp_vd_task(void *xsc, void *null)
+vdsp_vd_task(void *xsc)
{
struct vdsp_softc *sc = xsc;
struct vd_desc *vd;
}
void
-vdsp_open(void *arg1, void *null)
+vdsp_open(void *arg1)
{
struct vdsp_softc *sc = arg1;
struct proc *p = curproc;
}
void
-vdsp_close(void *arg1, void *null)
+vdsp_close(void *arg1)
{
struct vdsp_softc *sc = arg1;
struct proc *p = curproc;
}
void
-vdsp_alloc(void *arg1, void *null)
+vdsp_alloc(void *arg1)
{
struct vdsp_softc *sc = arg1;
struct vio_dring_reg dr;
sc->sc_descriptor_size, M_DEVBUF, M_WAITOK);
sc->sc_vd_ring = mallocarray(sc->sc_num_descriptors,
sizeof(*sc->sc_vd_ring), M_DEVBUF, M_WAITOK);
- task_set(&sc->sc_vd_task, vdsp_vd_task, sc, NULL);
+ task_set(&sc->sc_vd_task, vdsp_vd_task, sc);
bzero(&dr, sizeof(dr));
dr.tag.type = VIO_TYPE_CTRL;
}
void
-vdsp_read(void *arg1, void *null)
+vdsp_read(void *arg1)
{
struct vdsp_softc *sc = arg1;
-/* $OpenBSD: crypto.c,v 1.72 2014/10/23 00:15:09 dlg Exp $ */
+/* $OpenBSD: crypto.c,v 1.73 2015/01/27 03:17:35 dlg Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
crypto_dispatch(struct cryptop *crp)
{
if (crypto_taskq && !(crp->crp_flags & CRYPTO_F_NOQUEUE)) {
- task_set(&crp->crp_task, (void (*))crypto_invoke, crp, NULL);
+ task_set(&crp->crp_task, (void (*))crypto_invoke, crp);
task_add(crypto_taskq, &crp->crp_task);
} else {
crypto_invoke(crp);
/* not from the crypto queue, wakeup the userland process */
crp->crp_callback(crp);
} else {
- task_set(&crp->crp_task, (void (*))crp->crp_callback,
- crp, NULL);
+ task_set(&crp->crp_task, (void (*))crp->crp_callback, crp);
task_add(crypto_taskq, &crp->crp_task);
}
}
-/* $OpenBSD: atascsi.c,v 1.121 2014/12/09 07:05:06 doug Exp $ */
+/* $OpenBSD: atascsi.c,v 1.122 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
void atascsi_disk_write_same_16(struct scsi_xfer *);
void atascsi_disk_write_same_16_done(struct ata_xfer *);
void atascsi_disk_unmap(struct scsi_xfer *);
-void atascsi_disk_unmap_task(void *, void *);
+void atascsi_disk_unmap_task(void *);
void atascsi_disk_unmap_done(struct ata_xfer *);
void atascsi_disk_capacity(struct scsi_xfer *);
void atascsi_disk_capacity16(struct scsi_xfer *);
/* let's go */
if (ISSET(xs->flags, SCSI_NOSLEEP)) {
- task_set(&xa->task, atascsi_disk_unmap_task, xs, NULL);
+ task_set(&xa->task, atascsi_disk_unmap_task, xs);
task_add(systq, &xa->task);
} else {
/* we can already sleep for memory */
- atascsi_disk_unmap_task(xs, NULL);
+ atascsi_disk_unmap_task(xs);
}
}
void
-atascsi_disk_unmap_task(void *xxs, void *a)
+atascsi_disk_unmap_task(void *xxs)
{
struct scsi_xfer *xs = xxs;
struct scsi_link *link = xs->sc_link;
-/* $OpenBSD: audio.c,v 1.126 2015/01/20 04:54:23 dlg Exp $ */
+/* $OpenBSD: audio.c,v 1.127 2015/01/27 03:17:35 dlg Exp $ */
/* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */
/*
#if NWSKBD > 0
/* Mixer manipulation using keyboard */
int wskbd_set_mixervolume(long, long);
-void wskbd_set_mixervolume_callback(void *, void *);
+void wskbd_set_mixervolume_callback(void *);
#endif
/*
if (ch == NULL)
return (ENOMEM);
- task_set(&ch->t, wskbd_set_mixervolume_callback, ch, NULL);
+ task_set(&ch->t, wskbd_set_mixervolume_callback, ch);
ch->dir = dir;
ch->out = out;
task_add(systq, &ch->t);
}
void
-wskbd_set_mixervolume_callback(void *xch, void *null)
+wskbd_set_mixervolume_callback(void *xch)
{
struct wskbd_vol_change *ch = xch;
struct audio_softc *sc;
-/* $OpenBSD: cardslot.c,v 1.17 2014/12/19 05:48:36 tedu Exp $ */
+/* $OpenBSD: cardslot.c,v 1.18 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: cardslot.c,v 1.9 2000/03/22 09:35:06 haya Exp $ */
/*
STATIC void cardslotattach(struct device *, struct device *, void *);
STATIC int cardslotmatch(struct device *, void *, void *);
-STATIC void cardslot_event(void *arg1, void *arg2);
+STATIC void cardslot_event(void *arg);
STATIC void cardslot_process_event(struct cardslot_softc *);
STATIC int cardslot_cb_print(void *aux, const char *pcic);
sc->sc_cb_softc = NULL;
sc->sc_16_softc = NULL;
SIMPLEQ_INIT(&sc->sc_events);
- task_set(&sc->sc_event_task, cardslot_event, sc, NULL);
+ task_set(&sc->sc_event_task, cardslot_event, sc);
printf(" slot %d flags %x\n", sc->sc_slot,
sc->sc_dev.dv_cfdata->cf_flags);
*
*/
STATIC void
-cardslot_event(void *arg1, void *arg2)
+cardslot_event(void *arg1)
{
struct cardslot_softc *sc = arg1;
-/* $OpenBSD: mpi.c,v 1.198 2014/09/17 10:11:33 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.199 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
int mpi_evt_sas(struct mpi_softc *, struct mpi_rcb *);
void mpi_evt_sas_detach(void *, void *);
void mpi_evt_sas_detach_done(struct mpi_ccb *);
-void mpi_fc_rescan(void *, void *);
+void mpi_fc_rescan(void *);
int mpi_req_cfg_header(struct mpi_softc *, u_int8_t,
u_int8_t, u_int32_t, int, void *);
printf("\n");
rw_init(&sc->sc_lock, "mpi_lock");
- task_set(&sc->sc_evt_rescan, mpi_fc_rescan, sc, NULL);
+ task_set(&sc->sc_evt_rescan, mpi_fc_rescan, sc);
/* disable interrupts */
mpi_write(sc, MPI_INTR_MASK,
}
void
-mpi_fc_rescan(void *xsc, void *null)
+mpi_fc_rescan(void *xsc)
{
struct mpi_softc *sc = xsc;
struct mpi_cfg_hdr hdr;
-/* $OpenBSD: qla.c,v 1.46 2014/12/19 07:23:57 deraadt Exp $ */
+/* $OpenBSD: qla.c,v 1.47 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
void qla_update_start(struct qla_softc *, int);
void qla_update_done(struct qla_softc *, int);
-void qla_do_update(void *, void*);
+void qla_do_update(void *);
void qla_put_marker(struct qla_softc *, void *);
void qla_put_cmd(struct qla_softc *, void *, struct scsi_xfer *,
}
sc->sc_update_taskq = taskq_create(DEVNAME(sc), 1, IPL_BIO);
- task_set(&sc->sc_update_task, qla_do_update, sc, NULL);
+ task_set(&sc->sc_update_task, qla_do_update, sc);
/* wait a bit for link to come up so we can scan and attach devices */
for (i = 0; i < QLA_WAIT_FOR_LOOP * 10000; i++) {
}
if (sc->sc_loop_up) {
- qla_do_update(sc, NULL);
+ qla_do_update(sc);
} else {
DPRINTF(QLA_D_PORT, "%s: loop still down, giving up\n",
DEVNAME(sc));
}
void
-qla_do_update(void *xsc, void *x)
+qla_do_update(void *xsc)
{
struct qla_softc *sc = xsc;
int firstport, lastport;
-/* $OpenBSD: qlw.c,v 1.26 2014/12/19 07:23:57 deraadt Exp $ */
+/* $OpenBSD: qlw.c,v 1.27 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
int qlw_config_target(struct qlw_softc *, int, int);
void qlw_update_bus(struct qlw_softc *, int);
void qlw_update_target(struct qlw_softc *, int, int);
-void qlw_update_task(void *, void *);
+void qlw_update_task(void *);
void qlw_handle_intr(struct qlw_softc *, u_int16_t, u_int16_t);
void qlw_set_ints(struct qlw_softc *, int);
int reset_delay;
int bus;
- task_set(&sc->sc_update_task, qlw_update_task, sc, NULL);
+ task_set(&sc->sc_update_task, qlw_update_task, sc);
switch (sc->sc_isp_gen) {
case QLW_GEN_ISP1000:
}
void
-qlw_update_task(void *arg1, void *arg2)
+qlw_update_task(void *xsc)
{
- struct qlw_softc *sc = arg1;
+ struct qlw_softc *sc = xsc;
int bus;
for (bus = 0; bus < sc->sc_numbusses; bus++)
-/* $OpenBSD: arc.c,v 1.105 2015/01/12 00:07:55 dlg Exp $ */
+/* $OpenBSD: arc.c,v 1.106 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
struct arc_softc *sc;
};
/* sensors */
-void arc_create_sensors(void *, void *);
+void arc_create_sensors(void *);
void arc_refresh_sensors(void *);
#endif /* SMALL_KERNEL */
#endif
at = malloc(sizeof(*at), M_TEMP, M_WAITOK);
at->sc = sc;
- task_set(&at->t, arc_create_sensors, at, NULL);
+ task_set(&at->t, arc_create_sensors, at);
task_add(systq, &at->t);
}
#endif
#ifndef SMALL_KERNEL
void
-arc_create_sensors(void *xat, void *null)
+arc_create_sensors(void *xat)
{
struct arc_task *at = xat;
struct arc_softc *sc = at->sc;
-/* $OpenBSD: drm_crtc_helper.c,v 1.7 2014/03/09 11:07:18 jsg Exp $ */
+/* $OpenBSD: drm_crtc_helper.c,v 1.8 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2006-2008 Intel Corporation
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
#define DRM_OUTPUT_POLL_SECONDS 10
-static void drm_output_poll_execute(void *arg1, void *arg2)
+static void drm_output_poll_execute(void *arg1)
{
struct drm_device *dev = (struct drm_device *)arg1;
struct drm_connector *connector;
void drm_kms_helper_poll_init(struct drm_device *dev)
{
- task_set(&dev->mode_config.poll_task, drm_output_poll_execute, dev,
- NULL);
+ task_set(&dev->mode_config.poll_task, drm_output_poll_execute, dev);
timeout_set(&dev->mode_config.output_poll_to, drm_output_poll_tick,
dev);
dev->mode_config.poll_enabled = true;
-/* $OpenBSD: i915_drv.c,v 1.69 2014/12/20 16:34:27 krw Exp $ */
+/* $OpenBSD: i915_drv.c,v 1.70 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
void inteldrm_free_screen(void *, void *);
int inteldrm_show_screen(void *, void *, int,
void (*)(void *, int, int), void *);
-void inteldrm_doswitch(void *, void *);
+void inteldrm_doswitch(void *);
int inteldrm_load_font(void *, void *, struct wsdisplay_font *);
int inteldrm_list_font(void *, struct wsdisplay_font *);
int inteldrm_getchar(void *, int, int, struct wsdisplay_charcell *);
return (EAGAIN);
}
- inteldrm_doswitch(v, cookie);
+ inteldrm_doswitch(v);
return (0);
}
void
-inteldrm_doswitch(void *v, void *dummy)
+inteldrm_doswitch(void *v)
{
struct inteldrm_softc *dev_priv = v;
struct rasops_info *ri = &dev_priv->ro;
mtx_init(&dev_priv->error_completion_lock, IPL_NONE);
rw_init(&dev_priv->rps.hw_lock, "rpshw");
- task_set(&dev_priv->switchtask, inteldrm_doswitch, dev_priv, NULL);
+ task_set(&dev_priv->switchtask, inteldrm_doswitch, dev_priv);
/* we need to use this api for now due to sharing with intagp */
bar = vga_pci_bar_info(vga_sc, (IS_I9XX(dev) ? 0 : 1));
-/* $OpenBSD: i915_drv.h,v 1.54 2014/12/20 16:34:27 krw Exp $ */
+/* $OpenBSD: i915_drv.h,v 1.55 2015/01/27 03:17:36 dlg Exp $ */
/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
*/
/*
int i915_gem_check_wedge(struct inteldrm_softc *,
bool interruptible);
-void i915_gem_retire_work_handler(void *, void*);
+void i915_gem_retire_work_handler(void *);
int i915_gem_idle(struct drm_device *);
void i915_gem_object_move_to_active(struct drm_i915_gem_object *,
struct intel_ring_buffer *);
-/* $OpenBSD: i915_gem.c,v 1.78 2014/12/17 06:58:10 guenther Exp $ */
+/* $OpenBSD: i915_gem.c,v 1.79 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
}
void
-i915_gem_retire_work_handler(void *arg1, void *unused)
+i915_gem_retire_work_handler(void *arg1)
{
drm_i915_private_t *dev_priv = arg1;
struct drm_device *dev;
for (i = 0; i < I915_MAX_NUM_FENCES; i++)
INIT_LIST_HEAD(&dev_priv->fence_regs[i].lru_list);
task_set(&dev_priv->mm.retire_task, i915_gem_retire_work_handler,
- dev_priv, NULL);
+ dev_priv);
timeout_set(&dev_priv->mm.retire_timer, inteldrm_timeout, dev_priv);
#if 0
init_completion(&dev_priv->error_completion);
-/* $OpenBSD: i915_irq.c,v 1.13 2014/07/12 18:48:52 tedu Exp $ */
+/* $OpenBSD: i915_irq.c,v 1.14 2015/01/27 03:17:36 dlg Exp $ */
/* i915_irq.c -- IRQ support for the I915 -*- linux-c -*-
*/
/*
/*
* Handle hotplug events outside the interrupt handler proper.
*/
-static void i915_hotplug_work_func(void *arg1, void *arg2)
+static void i915_hotplug_work_func(void *arg1)
{
drm_i915_private_t *dev_priv = (drm_i915_private_t *)arg1;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
}
}
-static void gen6_pm_rps_work(void *arg1, void *arg2)
+static void gen6_pm_rps_work(void *arg1)
{
drm_i915_private_t *dev_priv = arg1;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
* this event, userspace should try to remap the bad rows since statistically
* it is likely the same row is more likely to go bad again.
*/
-static void ivybridge_parity_work(void *arg1, void *arg2)
+static void ivybridge_parity_work(void *arg1)
{
drm_i915_private_t *dev_priv = arg1;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
* Fire an error uevent so userspace can see that a hang or error
* was detected.
*/
-static void i915_error_work_func(void *arg1, void *arg2)
+static void i915_error_work_func(void *arg1)
{
drm_i915_private_t *dev_priv = arg1;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
{
struct drm_i915_private *dev_priv = dev->dev_private;
- task_set(&dev_priv->hotplug_task, i915_hotplug_work_func,
- dev_priv, NULL);
- task_set(&dev_priv->error_task, i915_error_work_func,
- dev_priv, NULL);
- task_set(&dev_priv->rps.task, gen6_pm_rps_work,
- dev_priv, NULL);
+ task_set(&dev_priv->hotplug_task, i915_hotplug_work_func, dev_priv);
+ task_set(&dev_priv->error_task, i915_error_work_func, dev_priv);
+ task_set(&dev_priv->rps.task, gen6_pm_rps_work, dev_priv);
task_set(&dev_priv->l3_parity.error_task, ivybridge_parity_work,
- dev_priv, NULL);
+ dev_priv);
dev->driver->get_vblank_counter = i915_get_vblank_counter;
dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
-/* $OpenBSD: intel_display.c,v 1.37 2014/10/08 05:25:41 jsg Exp $ */
+/* $OpenBSD: intel_display.c,v 1.38 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright © 2006-2007 Intel Corporation
*
kfree(intel_crtc);
}
-static void intel_unpin_work_fn(void *arg1, void *arg2)
+static void intel_unpin_work_fn(void *arg1)
{
struct intel_unpin_work *work = arg1;
struct drm_device *dev = work->crtc->dev;
work->event = event;
work->crtc = crtc;
work->old_fb_obj = to_intel_framebuffer(old_fb)->obj;
- task_set(&work->task, intel_unpin_work_fn, work, NULL);
+ task_set(&work->task, intel_unpin_work_fn, work);
ret = drm_vblank_get(dev, intel_crtc->pipe);
if (ret)
-/* $OpenBSD: intel_dp.c,v 1.20 2014/06/19 06:51:05 jsg Exp $ */
+/* $OpenBSD: intel_dp.c,v 1.21 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright © 2008 Intel Corporation
*
}
}
-static void ironlake_panel_vdd_work(void *arg1, void *arg2)
+static void ironlake_panel_vdd_work(void *arg1)
{
struct intel_dp *intel_dp = arg1;
struct drm_device *dev = intel_dp_to_dev(intel_dp);
connector->interlace_allowed = true;
connector->doublescan_allowed = 0;
- task_set(&intel_dp->panel_vdd_task, ironlake_panel_vdd_work, intel_dp,
- NULL);
+ task_set(&intel_dp->panel_vdd_task, ironlake_panel_vdd_work, intel_dp);
timeout_set(&intel_dp->panel_vdd_to, ironlake_panel_vdd_tick, intel_dp);
intel_connector_attach_encoder(intel_connector, intel_encoder);
-/* $OpenBSD: intel_pm.c,v 1.21 2014/03/24 17:06:49 kettenis Exp $ */
+/* $OpenBSD: intel_pm.c,v 1.22 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright © 2012 Intel Corporation
*
return dev_priv->display.fbc_enabled(dev);
}
-static void intel_fbc_work_fn(void *arg1, void *arg2)
+static void intel_fbc_work_fn(void *arg1)
{
struct intel_fbc_work *work = arg1;
struct drm_device *dev = work->crtc->dev;
work->crtc = crtc;
work->fb = crtc->fb;
work->interval = interval;
- task_set(&work->task, intel_fbc_work_fn, work, NULL);
+ task_set(&work->task, intel_fbc_work_fn, work);
timeout_set(&work->to, intel_fbc_work_tick, work);
dev_priv->fbc_work = work;
}
}
-static void intel_gen6_powersave_work(void *arg1, void *arg2)
+static void intel_gen6_powersave_work(void *arg1)
{
drm_i915_private_t *dev_priv = arg1;
struct drm_device *dev = (struct drm_device *)dev_priv->drmdev;
struct drm_i915_private *dev_priv = dev->dev_private;
task_set(&dev_priv->rps.delayed_resume_task, intel_gen6_powersave_work,
- dev_priv, NULL);
+ dev_priv);
timeout_set(&dev_priv->rps.delayed_resume_to, intel_gen6_powersave_tick,
dev_priv);
}
-/* $OpenBSD: r600_audio.c,v 1.1 2013/08/12 04:11:53 jsg Exp $ */
+/* $OpenBSD: r600_audio.c,v 1.2 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
* update all hdmi interfaces with current audio parameters
*/
void
-r600_audio_update_hdmi(void *arg1, void *arg2)
+r600_audio_update_hdmi(void *arg1)
{
struct radeon_device *rdev = arg1;
struct drm_device *dev = rdev->ddev;
-/* $OpenBSD: radeon.h,v 1.9 2014/12/20 16:34:27 krw Exp $ */
+/* $OpenBSD: radeon.h,v 1.10 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
int radeon_vm_bo_rmv(struct radeon_device *rdev,
struct radeon_bo_va *bo_va);
-void radeon_hotplug_work_func(void *arg1, void *arg2);
+void radeon_hotplug_work_func(void *arg1);
/* audio */
-void r600_audio_update_hdmi(void *arg1, void *arg2);
+void r600_audio_update_hdmi(void *arg1);
/*
* R600 vram scratch functions
-/* $OpenBSD: radeon_display.c,v 1.7 2014/05/03 05:26:47 jsg Exp $ */
+/* $OpenBSD: radeon_display.c,v 1.8 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright 2007-8 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
#include <dev/pci/drm/drm_crtc_helper.h>
#include <dev/pci/drm/drm_edid.h>
-void radeon_unpin_work_func(void *, void *);
+void radeon_unpin_work_func(void *);
static void avivo_crtc_load_lut(struct drm_crtc *crtc)
{
* Handle unpin events outside the interrupt handler proper.
*/
void
-radeon_unpin_work_func(void *arg1, void *arg2)
+radeon_unpin_work_func(void *arg1)
{
struct radeon_unpin_work *work = arg1;
int r;
work->fence = radeon_fence_ref(rbo->tbo.sync_obj);
mtx_leave(&rbo->tbo.bdev->fence_lock);
- task_set(&work->task, radeon_unpin_work_func, work, NULL);
+ task_set(&work->task, radeon_unpin_work_func, work);
/* We borrow the event spin lock for protecting unpin_work */
mtx_enter(&dev->event_lock);
-/* $OpenBSD: radeon_fb.c,v 1.5 2014/02/09 11:03:31 jsg Exp $ */
+/* $OpenBSD: radeon_fb.c,v 1.6 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright © 2007 David Airlie
*
int radeonfb_create_pinned_object(struct radeon_fbdev *,
struct drm_mode_fb_cmd2 *, struct drm_gem_object **);
-void radeondrm_burner_cb(void *, void *);
+void radeondrm_burner_cb(void *);
int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled)
{
return ret;
}
- task_set(&rdev->burner_task, radeondrm_burner_cb, rdev, NULL);
+ task_set(&rdev->burner_task, radeondrm_burner_cb, rdev);
drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
#ifdef __sparc64__
}
void
-radeondrm_burner_cb(void *arg1, void *arg2)
+radeondrm_burner_cb(void *arg1)
{
struct radeon_device *rdev = arg1;
struct drm_fb_helper *helper = &rdev->mode_info.rfbdev->helper;
-/* $OpenBSD: radeon_irq_kms.c,v 1.4 2014/04/07 06:43:11 jsg Exp $ */
+/* $OpenBSD: radeon_irq_kms.c,v 1.5 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
* a drm hotplug event to alert userspace.
*/
void
-radeon_hotplug_work_func(void *arg1, void *arg2)
+radeon_hotplug_work_func(void *arg1)
{
struct radeon_device *rdev = arg1;
struct drm_device *dev = rdev->ddev;
{
int r = 0;
- task_set(&rdev->hotplug_task, radeon_hotplug_work_func, rdev, NULL);
- task_set(&rdev->audio_task, r600_audio_update_hdmi, rdev, NULL);
+ task_set(&rdev->hotplug_task, radeon_hotplug_work_func, rdev);
+ task_set(&rdev->audio_task, r600_audio_update_hdmi, rdev);
mtx_init(&rdev->irq.lock, IPL_TTY);
r = drm_vblank_init(rdev->ddev, rdev->num_crtc);
-/* $OpenBSD: radeon_kms.c,v 1.31 2014/12/20 16:34:27 krw Exp $ */
+/* $OpenBSD: radeon_kms.c,v 1.32 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
void radeondrm_free_screen(void *, void *);
int radeondrm_show_screen(void *, void *, int,
void (*)(void *, int, int), void *);
-void radeondrm_doswitch(void *, void *);
+void radeondrm_doswitch(void *);
#ifdef __sparc64__
void radeondrm_setcolor(void *, u_int, u_int8_t, u_int8_t, u_int8_t);
#endif
return (EAGAIN);
}
- radeondrm_doswitch(v, cookie);
+ radeondrm_doswitch(v);
return (0);
}
void
-radeondrm_doswitch(void *v, void *dummy)
+radeondrm_doswitch(void *v)
{
struct rasops_info *ri = v;
struct radeon_device *rdev = ri->ri_hw;
struct wsemuldisplaydev_attach_args aa;
struct rasops_info *ri = &rdev->ro;
- task_set(&rdev->switchtask, radeondrm_doswitch, ri, NULL);
+ task_set(&rdev->switchtask, radeondrm_doswitch, ri);
if (ri->ri_bits == NULL)
return;
-/* $OpenBSD: radeon_pm.c,v 1.7 2014/02/15 12:43:38 jsg Exp $ */
+/* $OpenBSD: radeon_pm.c,v 1.8 2015/01/27 03:17:36 dlg Exp $ */
/*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
ssize_t radeon_set_pm_method(struct device *, struct device_attribute *,
const char *, size_t);
void radeon_dynpm_idle_tick(void *);
-void radeon_dynpm_idle_work_handler(void *, void *);
+void radeon_dynpm_idle_work_handler(void *);
extern int ticks;
return ret;
task_set(&rdev->pm.dynpm_idle_task, radeon_dynpm_idle_work_handler,
- rdev, NULL);
+ rdev);
timeout_set(&rdev->pm.dynpm_idle_to, radeon_dynpm_idle_tick, rdev);
if (rdev->pm.num_power_states > 1) {
}
void
-radeon_dynpm_idle_work_handler(void *arg1, void *arg2)
+radeon_dynpm_idle_work_handler(void *arg1)
{
struct radeon_device *rdev = arg1;
int resched;
-/* $OpenBSD: ttm_bo.c,v 1.9 2014/11/16 12:31:00 deraadt Exp $ */
+/* $OpenBSD: ttm_bo.c,v 1.10 2015/01/27 03:17:36 dlg Exp $ */
/**************************************************************************
*
* Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA
static int ttm_bo_setup_vm(struct ttm_buffer_object *bo);
static int ttm_bo_swapout(struct ttm_mem_shrink *shrink);
static void ttm_bo_global_kobj_release(struct ttm_bo_global *glob);
-void ttm_bo_delayed_workqueue(void *, void *);
+void ttm_bo_delayed_workqueue(void *);
int ttm_bo_move_buffer(struct ttm_buffer_object *, struct ttm_placement *,
bool, bool);
}
void
-ttm_bo_delayed_workqueue(void *arg1, void *arg2)
+ttm_bo_delayed_workqueue(void *arg1)
{
struct ttm_bo_device *bdev = arg1;
if (unlikely(ret != 0))
goto out_no_addr_mm;
- task_set(&bdev->task, ttm_bo_delayed_workqueue, bdev, NULL);
+ task_set(&bdev->task, ttm_bo_delayed_workqueue, bdev);
timeout_set(&bdev->to, ttm_bo_delayed_tick, bdev);
INIT_LIST_HEAD(&bdev->ddestroy);
bdev->dev_mapping = NULL;
-/* $OpenBSD: ttm_memory.c,v 1.4 2014/02/09 10:57:26 jsg Exp $ */
+/* $OpenBSD: ttm_memory.c,v 1.5 2015/01/27 03:17:36 dlg Exp $ */
/**************************************************************************
*
* Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA
mtx_leave(&glob->lock);
}
-static void ttm_shrink_work(void *arg1, void *arg2)
+static void ttm_shrink_work(void *arg1)
{
struct ttm_mem_global *glob = arg1;
mtx_init(&glob->lock, IPL_TTY);
glob->swap_queue = taskq_create("ttm_swap", 1, IPL_TTY);
glob->task_queued = false;
- task_set(&glob->task, ttm_shrink_work, glob, NULL);
+ task_set(&glob->task, ttm_shrink_work, glob);
refcount_init(&glob->kobj_ref, 1);
-/* $OpenBSD: if_bnx.c,v 1.108 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.109 2015/01/27 03:17:36 dlg Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
struct rwlock bnx_tx_pool_lk = RWLOCK_INITIALIZER("bnxplinit");
struct pool *bnx_tx_pool = NULL;
-void bnx_alloc_pkts(void *, void *);
+void bnx_alloc_pkts(void *);
/****************************************************************************/
/* OpenBSD device dispatch table. */
TAILQ_INIT(&sc->tx_used_pkts);
sc->tx_pkt_count = 0;
mtx_init(&sc->tx_pkt_mtx, IPL_NET);
- task_set(&sc->tx_alloc_task, bnx_alloc_pkts, sc, NULL);
+ task_set(&sc->tx_alloc_task, bnx_alloc_pkts, sc);
/*
* Allocate DMA memory for the Rx buffer descriptor chain,
}
void
-bnx_alloc_pkts(void *xsc, void *arg)
+bnx_alloc_pkts(void *xsc)
{
struct bnx_softc *sc = xsc;
struct ifnet *ifp = &sc->arpcom.ac_if;
DBPRINT(sc, BNX_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__);
/* Force an allocation of some dmamaps for tx up front */
- bnx_alloc_pkts(sc, NULL);
+ bnx_alloc_pkts(sc);
/* Set the initial TX producer/consumer indices. */
sc->tx_prod = 0;
-/* $OpenBSD: if_iwi.c,v 1.121 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.122 2015/01/27 03:17:36 dlg Exp $ */
/*-
* Copyright (c) 2004-2008
void iwi_attach(struct device *, struct device *, void *);
int iwi_activate(struct device *, int);
void iwi_wakeup(struct iwi_softc *);
-void iwi_init_task(void *, void *);
+void iwi_init_task(void *);
int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
void iwi_reset_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
void iwi_free_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
sc->sc_txtap.wt_ihdr.it_present = htole32(IWI_TX_RADIOTAP_PRESENT);
#endif
- task_set(&sc->init_task, iwi_init_task, sc, NULL);
+ task_set(&sc->init_task, iwi_init_task, sc);
return;
fail: while (--ac >= 0)
data &= ~0x0000ff00;
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, data);
- iwi_init_task(sc, NULL);
+ iwi_init_task(sc);
}
void
-iwi_init_task(void *arg1, void *arg2)
+iwi_init_task(void *arg1)
{
struct iwi_softc *sc = arg1;
struct ifnet *ifp = &sc->sc_ic.ic_if;
-/* $OpenBSD: if_iwn.c,v 1.137 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.138 2015/01/27 03:17:36 dlg Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
int iwn_detach(struct device *, int);
int iwn_activate(struct device *, int);
void iwn_wakeup(struct iwn_softc *);
-void iwn_init_task(void *, void *);
+void iwn_init_task(void *);
int iwn_nic_lock(struct iwn_softc *);
int iwn_eeprom_lock(struct iwn_softc *);
int iwn_init_otprom(struct iwn_softc *);
iwn_radiotap_attach(sc);
#endif
timeout_set(&sc->calib_to, iwn_calib_timeout, sc);
- task_set(&sc->init_task, iwn_init_task, sc, NULL);
+ task_set(&sc->init_task, iwn_init_task, sc);
return;
/* Free allocated memory if something failed during attachment. */
reg = pci_conf_read(sc->sc_pct, sc->sc_pcitag, 0x40);
if (reg & 0xff00)
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg & ~0xff00);
- iwn_init_task(sc, NULL);
+ iwn_init_task(sc);
}
void
-iwn_init_task(void *arg1, void *arg2)
+iwn_init_task(void *arg1)
{
struct iwn_softc *sc = arg1;
struct ifnet *ifp = &sc->sc_ic.ic_if;
-/* $OpenBSD: if_wpi.c,v 1.122 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.123 2015/01/27 03:17:36 dlg Exp $ */
/*-
* Copyright (c) 2006-2008
int wpi_detach(struct device *, int);
int wpi_activate(struct device *, int);
void wpi_wakeup(struct wpi_softc *);
-void wpi_init_task(void *, void *);
+void wpi_init_task(void *);
int wpi_nic_lock(struct wpi_softc *);
int wpi_read_prom_data(struct wpi_softc *, uint32_t, void *, int);
int wpi_dma_contig_alloc(bus_dma_tag_t, struct wpi_dma_info *,
wpi_radiotap_attach(sc);
#endif
timeout_set(&sc->calib_to, wpi_calib_timeout, sc);
- task_set(&sc->init_task, wpi_init_task, sc, NULL);
+ task_set(&sc->init_task, wpi_init_task, sc);
return;
/* Free allocated memory if something failed during attachment. */
reg &= ~0xff00;
pci_conf_write(sc->sc_pct, sc->sc_pcitag, 0x40, reg);
- wpi_init_task(sc, NULL);
+ wpi_init_task(sc);
}
void
-wpi_init_task(void *arg1, void *args2)
+wpi_init_task(void *arg1)
{
struct wpi_softc *sc = arg1;
struct ifnet *ifp = &sc->sc_ic.ic_if;
-/* $OpenBSD: mpii.c,v 1.97 2014/09/16 05:12:04 dlg Exp $ */
+/* $OpenBSD: mpii.c,v 1.98 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
void mpii_eventack_done(struct mpii_ccb *);
void mpii_event_process(struct mpii_softc *, struct mpii_rcb *);
void mpii_event_done(struct mpii_softc *, struct mpii_rcb *);
-void mpii_event_sas(void *, void *);
+void mpii_event_sas(void *);
void mpii_event_raid(struct mpii_softc *,
struct mpii_msg_event_reply *);
SIMPLEQ_INIT(&sc->sc_evt_sas_queue);
mtx_init(&sc->sc_evt_sas_mtx, IPL_BIO);
- task_set(&sc->sc_evt_sas_task, mpii_event_sas, sc, NULL);
+ task_set(&sc->sc_evt_sas_task, mpii_event_sas, sc);
SIMPLEQ_INIT(&sc->sc_evt_ack_queue);
mtx_init(&sc->sc_evt_ack_mtx, IPL_BIO);
}
void
-mpii_event_sas(void *xsc, void *x)
+mpii_event_sas(void *xsc)
{
struct mpii_softc *sc = xsc;
struct mpii_rcb *rcb, *next;
-/* $OpenBSD: ppb.c,v 1.60 2014/11/24 13:48:49 kettenis Exp $ */
+/* $OpenBSD: ppb.c,v 1.61 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */
/*
void ppb_alloc_resources(struct ppb_softc *, struct pci_attach_args *);
int ppb_intr(void *);
-void ppb_hotplug_insert(void *, void *);
+void ppb_hotplug_insert(void *);
void ppb_hotplug_insert_finish(void *);
int ppb_hotplug_fixup(struct pci_attach_args *);
int ppb_hotplug_fixup_type0(pci_chipset_tag_t, pcitag_t, pcitag_t);
int ppb_hotplug_fixup_type1(pci_chipset_tag_t, pcitag_t, pcitag_t);
-void ppb_hotplug_rescan(void *, void *);
-void ppb_hotplug_remove(void *, void *);
+void ppb_hotplug_rescan(void *);
+void ppb_hotplug_remove(void *);
int ppbprint(void *, const char *pnp);
int
/* Check for PCI Express capabilities and setup hotplug support. */
if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
&sc->sc_cap_off, ®) && (reg & PCI_PCIE_XCAP_SI)) {
- task_set(&sc->sc_insert_task, ppb_hotplug_insert, sc, NULL);
- task_set(&sc->sc_rescan_task, ppb_hotplug_rescan, sc, NULL);
- task_set(&sc->sc_remove_task, ppb_hotplug_remove, sc, NULL);
+ task_set(&sc->sc_insert_task, ppb_hotplug_insert, sc);
+ task_set(&sc->sc_rescan_task, ppb_hotplug_rescan, sc);
+ task_set(&sc->sc_remove_task, ppb_hotplug_remove, sc);
timeout_set(&sc->sc_to, ppb_hotplug_insert_finish, sc);
#ifdef __i386__
#endif
void
-ppb_hotplug_insert(void *arg1, void *arg2)
+ppb_hotplug_insert(void *xsc)
{
- struct ppb_softc *sc = arg1;
+ struct ppb_softc *sc = xsc;
struct pci_softc *psc = (struct pci_softc *)sc->sc_psc;
if (!LIST_EMPTY(&psc->sc_devs))
}
void
-ppb_hotplug_rescan(void *arg1, void *arg2)
+ppb_hotplug_rescan(void *xsc)
{
- struct ppb_softc *sc = arg1;
+ struct ppb_softc *sc = xsc;
struct pci_softc *psc = (struct pci_softc *)sc->sc_psc;
if (psc) {
}
void
-ppb_hotplug_remove(void *arg1, void *arg2)
+ppb_hotplug_remove(void *xsc)
{
- struct ppb_softc *sc = arg1;
+ struct ppb_softc *sc = xsc;
struct pci_softc *psc = (struct pci_softc *)sc->sc_psc;
if (psc) {
-/* $OpenBSD: qle.c,v 1.32 2014/09/13 16:06:37 doug Exp $ */
+/* $OpenBSD: qle.c,v 1.33 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
void qle_update_start(struct qle_softc *, int);
void qle_update_done(struct qle_softc *, int);
-void qle_do_update(void *, void *);
+void qle_do_update(void *);
int qle_async(struct qle_softc *, u_int16_t);
int qle_load_fwchunk(struct qle_softc *,
}
sc->sc_update_taskq = taskq_create(DEVNAME(sc), 1, IPL_BIO);
- task_set(&sc->sc_update_task, qle_do_update, sc, NULL);
+ task_set(&sc->sc_update_task, qle_do_update, sc);
/* wait a bit for link to come up so we can scan and attach devices */
for (i = 0; i < QLE_WAIT_FOR_LOOP * 10000; i++) {
}
if (sc->sc_loop_up) {
- qle_do_update(sc, NULL);
+ qle_do_update(sc);
} else {
DPRINTF(QLE_D_PORT, "%s: loop still down, giving up\n",
DEVNAME(sc));
}
void
-qle_do_update(void *xsc, void *x)
+qle_do_update(void *xsc)
{
struct qle_softc *sc = xsc;
int firstport, lastport;
-/* $OpenBSD: viomb.c,v 1.10 2014/07/11 08:48:38 jasper Exp $ */
+/* $OpenBSD: viomb.c,v 1.11 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: viomb.c,v 1.1 2011/10/30 12:12:21 hannken Exp $ */
/*
int viomb_match(struct device *, void *, void *);
void viomb_attach(struct device *, struct device *, void *);
-void viomb_worker(void *, void *);
+void viomb_worker(void *);
void viomb_inflate(struct viomb_softc *);
void viomb_deflate(struct viomb_softc *);
int viomb_config_change(struct virtio_softc *);
sc->sc_taskq = taskq_create("viomb", 1, IPL_BIO);
if (sc->sc_taskq == NULL)
goto err_dmamap;
- task_set(&sc->sc_task, viomb_worker, sc, NULL);
+ task_set(&sc->sc_task, viomb_worker, sc);
strlcpy(sc->sc_sensdev.xname, DEVNAME(sc),
sizeof(sc->sc_sensdev.xname));
}
void
-viomb_worker(void *arg1, void *arg2)
+viomb_worker(void *arg1)
{
struct viomb_softc *sc = (struct viomb_softc *)arg1;
int s;
-/* $OpenBSD: vmwpvs.c,v 1.10 2014/07/13 23:10:23 deraadt Exp $ */
+/* $OpenBSD: vmwpvs.c,v 1.11 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
int vmwpvs_get_config(struct vmwpvs_softc *);
void vmwpvs_setup_rings(struct vmwpvs_softc *);
void vmwpvs_setup_msg_ring(struct vmwpvs_softc *);
-void vmwpvs_msg_task(void *, void *);
+void vmwpvs_msg_task(void *);
struct vmwpvs_ccb *
vmwpvs_scsi_cmd_poll(struct vmwpvs_softc *);
sc->sc_bus_width = 16;
mtx_init(&sc->sc_ring_mtx, IPL_BIO);
mtx_init(&sc->sc_ccb_mtx, IPL_BIO);
- task_set(&sc->sc_msg_task, vmwpvs_msg_task, sc, NULL);
+ task_set(&sc->sc_msg_task, vmwpvs_msg_task, sc);
SIMPLEQ_INIT(&sc->sc_ccb_list);
for (r = PCI_MAPREG_START; r < PCI_MAPREG_END; r += sizeof(memtype)) {
}
void
-vmwpvs_msg_task(void *xsc, void *xnull)
+vmwpvs_msg_task(void *xsc)
{
struct vmwpvs_softc *sc = xsc;
volatile struct vmwpvw_ring_state *s =
-/* $OpenBSD: rasops.c,v 1.37 2014/12/22 20:08:05 krw Exp $ */
+/* $OpenBSD: rasops.c,v 1.38 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */
/*-
};
#endif
-void rasops_doswitch(void *, void *);
+void rasops_doswitch(void *);
int rasops_vcons_cursor(void *, int, int, int);
int rasops_vcons_mapchar(void *, int, u_int *);
int rasops_vcons_putchar(void *, int, int, u_int, long);
ri->ri_ops.unpack_attr = rasops_vcons_unpack_attr;
}
- task_set(&ri->ri_switchtask, rasops_doswitch, ri, NULL);
+ task_set(&ri->ri_switchtask, rasops_doswitch, ri);
rasops_init_devcmap(ri);
return (0);
return (EAGAIN);
}
- rasops_doswitch(ri, NULL);
+ rasops_doswitch(ri);
return (0);
}
void
-rasops_doswitch(void *v, void *dummy)
+rasops_doswitch(void *v)
{
struct rasops_info *ri = v;
struct rasops_screen *scr = ri->ri_switchcookie;
-/* $OpenBSD: rnd.c,v 1.168 2014/12/23 20:32:05 tedu Exp $ */
+/* $OpenBSD: rnd.c,v 1.169 2015/01/27 03:17:35 dlg Exp $ */
/*
* Copyright (c) 2011 Theo de Raadt.
/* random keystream by ChaCha */
+void arc4_reinit(void *v); /* timeout to start reinit */
+void arc4_init(void *); /* actually do the reinit */
+
struct mutex rndlock = MUTEX_INITIALIZER(IPL_HIGH);
struct timeout arc4_timeout;
-struct task arc4_task;
-
-void arc4_reinit(void *v); /* timeout to start reinit */
-void arc4_init(void *, void *); /* actually do the reinit */
+struct task arc4_task = TASK_INITIALIZER(arc4_init, NULL);
static int rs_initialized;
static chacha_ctx rs; /* chacha context for random keystream */
/* ARGSUSED */
void
-arc4_init(void *v, void *w)
+arc4_init(void *null)
{
_rs_stir(1);
}
rs_initialized = 1;
dequeue_randomness(NULL);
- arc4_init(NULL, NULL);
- task_set(&arc4_task, arc4_init, NULL, NULL);
+ arc4_init(NULL);
timeout_set(&arc4_timeout, arc4_reinit, NULL);
arc4_reinit(NULL);
timeout_set(&rnd_timeout, dequeue_randomness, NULL);
}
if (newdata)
- arc4_init(NULL, NULL);
+ arc4_init(NULL);
explicit_bzero(buf, POOLBYTES);
free(buf, M_TEMP, POOLBYTES);
-/* $OpenBSD: softraid.c,v 1.347 2014/12/19 17:15:16 tedu Exp $ */
+/* $OpenBSD: softraid.c,v 1.348 2015/01/27 03:17:35 dlg Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
int sr_chunk_in_use(struct sr_softc *, dev_t);
int sr_rw(struct sr_softc *, dev_t, char *, size_t,
daddr_t, long);
-void sr_wu_done_callback(void *, void *);
+void sr_wu_done_callback(void *);
/* don't include these on RAMDISK */
#ifndef SMALL_KERNEL
}
void
-sr_meta_save_callback(void *arg1, void *arg2)
+sr_meta_save_callback(void *xsd)
{
- struct sr_discipline *sd = arg1;
+ struct sr_discipline *sd = xsd;
int s;
s = splbio();
- if (sr_meta_save(arg1, SR_META_DIRTY))
+ if (sr_meta_save(sd, SR_META_DIRTY))
printf("%s: save metadata failed\n", DEVNAME(sd->sd_sc));
sd->sd_must_flush = 0;
wu = malloc(wu_size, M_DEVBUF, M_WAITOK | M_ZERO);
TAILQ_INSERT_TAIL(&sd->sd_wu, wu, swu_next);
TAILQ_INIT(&wu->swu_ccb);
- task_set(&wu->swu_task, sr_wu_done_callback, sd, wu);
wu->swu_dis = sd;
+ task_set(&wu->swu_task, sr_wu_done_callback, wu);
sr_wu_put(sd, wu);
}
}
void
-sr_wu_done_callback(void *arg1, void *arg2)
+sr_wu_done_callback(void *xwu)
{
- struct sr_discipline *sd = (struct sr_discipline *)arg1;
- struct sr_workunit *wu = (struct sr_workunit *)arg2;
+ struct sr_workunit *wu = xwu;
+ struct sr_discipline *sd = wu->swu_dis;
struct scsi_xfer *xs = wu->swu_xs;
struct sr_workunit *wup;
int s;
}
void
-sr_hotspare_rebuild_callback(void *arg1, void *arg2)
+sr_hotspare_rebuild_callback(void *xsd)
{
- sr_hotspare_rebuild((struct sr_discipline *)arg1);
+ struct sr_discipline *sd = xsd;
+ sr_hotspare_rebuild(sd);
}
void
sd->sd_set_vol_state = sr_set_vol_state;
sd->sd_start_discipline = NULL;
- task_set(&sd->sd_meta_save_task, sr_meta_save_callback, sd, NULL);
+ task_set(&sd->sd_meta_save_task, sr_meta_save_callback, sd);
task_set(&sd->sd_hotspare_rebuild_task, sr_hotspare_rebuild_callback,
- sd, NULL);
+ sd);
switch (level) {
case 0:
-/* $OpenBSD: softraidvar.h,v 1.158 2014/10/07 20:23:32 tedu Exp $ */
+/* $OpenBSD: softraidvar.h,v 1.159 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
void sr_hotplug_unregister(struct sr_discipline *, void *);
/* Hotspare and rebuild. */
-void sr_hotspare_rebuild_callback(void *, void *);
+void sr_hotspare_rebuild_callback(void *);
/* work units & ccbs */
int sr_ccb_alloc(struct sr_discipline *);
struct sr_metadata *, void *);
int sr_meta_validate(struct sr_discipline *, dev_t,
struct sr_metadata *, void *);
-void sr_meta_save_callback(void *, void *);
+void sr_meta_save_callback(void *);
int sr_meta_save(struct sr_discipline *, u_int32_t);
void sr_meta_getdevname(struct sr_softc *, dev_t, char *,
int);
-/* $OpenBSD: vscsi.c,v 1.36 2015/01/02 10:38:22 dlg Exp $ */
+/* $OpenBSD: vscsi.c,v 1.37 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
int vscsi_t2i(struct vscsi_softc *, struct vscsi_ioc_t2i *);
int vscsi_devevent(struct vscsi_softc *, u_long,
struct vscsi_ioc_devevent *);
-void vscsi_devevent_task(void *, void *);
+void vscsi_devevent_task(void *);
void vscsi_done(struct vscsi_softc *, struct vscsi_ccb *);
void * vscsi_ccb_get(void *);
if (dt == NULL)
return (ENOMEM);
- task_set(&dt->t, vscsi_devevent_task, dt, NULL);
+ task_set(&dt->t, vscsi_devevent_task, dt);
dt->sc = sc;
dt->de = *de;
dt->cmd = cmd;
}
void
-vscsi_devevent_task(void *xdt, void *null)
+vscsi_devevent_task(void *xdt)
{
struct vscsi_devevent_task *dt = xdt;
struct vscsi_softc *sc = dt->sc;
-/* $OpenBSD: kern_sensors.c,v 1.33 2014/11/14 23:26:48 tedu Exp $ */
+/* $OpenBSD: kern_sensors.c,v 1.34 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
};
void sensor_task_tick(void *);
-void sensor_task_work(void *, void *);
+void sensor_task_work(void *);
struct sensor_task *
sensor_task_register(void *arg, void (*func)(void *), unsigned int period)
st->arg = arg;
st->period = period;
timeout_set(&st->timeout, sensor_task_tick, st);
- task_set(&st->task, sensor_task_work, st, NULL);
+ task_set(&st->task, sensor_task_work, st);
rw_init(&st->lock, "sensor");
sensor_task_tick(st);
}
void
-sensor_task_work(void *xst, void *arg)
+sensor_task_work(void *xst)
{
struct sensor_task *st = xst;
unsigned int period = 0;
-/* $OpenBSD: kern_task.c,v 1.12 2014/11/01 23:58:28 tedu Exp $ */
+/* $OpenBSD: kern_task.c,v 1.13 2015/01/27 03:17:36 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
}
void
-task_set(struct task *t, void (*fn)(void *, void *), void *arg1, void *arg2)
+task_set(struct task *t, void (*fn)(void *), void *arg)
{
t->t_func = fn;
- t->t_arg1 = arg1;
- t->t_arg2 = arg2;
-
+ t->t_arg = arg;
t->t_flags = 0;
}
KERNEL_UNLOCK();
while (taskq_next_work(tq, &work)) {
- (*work.t_func)(work.t_arg1, work.t_arg2);
+ (*work.t_func)(work.t_arg);
sched_pause();
}
-/* $OpenBSD: subr_disk.c,v 1.179 2014/12/30 04:00:33 krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.180 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
struct disk *dk;
};
-void disk_attach_callback(void *, void *);
+void disk_attach_callback(void *);
/*
* Compute checksum for disk label.
device_ref(dv);
dat->dk = diskp;
- task_set(&dat->task, disk_attach_callback, dat, NULL);
+ task_set(&dat->task, disk_attach_callback, dat);
task_add(systq, &dat->task);
}
}
}
void
-disk_attach_callback(void *xdat, void *null)
+disk_attach_callback(void *xdat)
{
struct disk_attach_task *dat = xdat;
struct disk *dk = dat->dk;
-/* $OpenBSD: if.c,v 1.313 2015/01/21 02:23:14 guenther Exp $ */
+/* $OpenBSD: if.c,v 1.314 2015/01/27 03:17:36 dlg Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
void if_congestion_clear(void *);
int if_group_egress_build(void);
-void if_link_state_change_task(void *, void *);
+void if_link_state_change_task(void *);
#ifdef DDB
void ifa_print_all(void);
timeout_set(ifp->if_slowtimo, if_slowtimo, ifp);
if_slowtimo(ifp);
- task_set(ifp->if_linkstatetask, if_link_state_change_task,
- ifp, NULL);
+ task_set(ifp->if_linkstatetask, if_link_state_change_task, ifp);
/* Announce the interface. */
rt_ifannouncemsg(ifp, IFAN_ARRIVAL);
* Process a link state change.
*/
void
-if_link_state_change_task(void *arg, void *unused)
+if_link_state_change_task(void *arg)
{
struct ifnet *ifp = arg;
int s;
-/* $OpenBSD: if_spppsubr.c,v 1.129 2014/12/19 17:14:39 tedu Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.130 2015/01/27 03:17:36 dlg Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
void sppp_get_ip6_addrs(struct sppp *sp, struct in6_addr *src,
struct in6_addr *dst, struct in6_addr *srcmask);
void sppp_set_ip6_addr(struct sppp *sp, const struct in6_addr *src, const struct in6_addr *dst);
-void sppp_update_ip6_addr(void *arg1, void *arg2);
+void sppp_update_ip6_addr(void *sp);
void sppp_suggest_ip6_addr(struct sppp *sp, struct in6_addr *suggest);
void sppp_pap_input(struct sppp *sp, struct mbuf *m);
void sppp_qflush(struct ifqueue *ifq);
int sppp_update_gw_walker(struct radix_node *rn, void *arg, u_int);
void sppp_update_gw(struct ifnet *ifp);
-void sppp_set_ip_addrs(void *, void *);
-void sppp_clear_ip_addrs(void *, void *);
+void sppp_set_ip_addrs(void *);
+void sppp_clear_ip_addrs(void *);
void sppp_set_phase(struct sppp *sp);
/* our control protocol descriptors */
sp->ipcp.flags = 0;
sp->state[IDX_IPCP] = STATE_INITIAL;
sp->fail_counter[IDX_IPCP] = 0;
- task_set(&sp->ipcp.set_addr_task, sppp_set_ip_addrs, sp, NULL);
- task_set(&sp->ipcp.clear_addr_task, sppp_clear_ip_addrs, sp, NULL);
+ task_set(&sp->ipcp.set_addr_task, sppp_set_ip_addrs, sp);
+ task_set(&sp->ipcp.clear_addr_task, sppp_clear_ip_addrs, sp);
}
void
sp->ipv6cp.flags = 0;
sp->state[IDX_IPV6CP] = STATE_INITIAL;
sp->fail_counter[IDX_IPV6CP] = 0;
- task_set(&sp->ipv6cp.set_addr_task, sppp_update_ip6_addr, sp,
- &sp->ipv6cp.req_ifid);
+ task_set(&sp->ipv6cp.set_addr_task, sppp_update_ip6_addr, sp);
}
void
* If an address is 0, leave it the way it is.
*/
void
-sppp_set_ip_addrs(void *arg1, void *arg2)
+sppp_set_ip_addrs(void *arg1)
{
struct sppp *sp = arg1;
u_int32_t myaddr;
* Clear IP addresses.
*/
void
-sppp_clear_ip_addrs(void *arg1, void *arg2)
+sppp_clear_ip_addrs(void *arg1)
{
struct sppp *sp = (struct sppp *)arg1;
struct ifnet *ifp = &sp->pp_if;
/* Task to update my IPv6 address from process context. */
void
-sppp_update_ip6_addr(void *arg1, void *arg2)
+sppp_update_ip6_addr(void *arg)
{
- struct sppp *sp = arg1;
+ struct sppp *sp = arg;
struct ifnet *ifp = &sp->pp_if;
- struct in6_aliasreq *ifra = arg2;
+ struct in6_aliasreq *ifra = &sp->ipv6cp.req_ifid;
struct in6_addr mask = in6mask128;
struct in6_ifaddr *ia6;
int s, error;
-/* $OpenBSD: ieee80211_input.c,v 1.129 2015/01/13 23:16:59 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.130 2015/01/27 03:17:36 dlg Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
#endif
void ieee80211_input_print(struct ieee80211com *, struct ifnet *,
struct ieee80211_frame *, struct ieee80211_rxinfo *);
-void ieee80211_input_print_task(void *, void *);
+void ieee80211_input_print_task(void *);
struct ieee80211printmsg {
struct task task;
* frames are received and the interface is put in debug mode.
*/
void
-ieee80211_input_print_task(void *arg1, void *arg2)
+ieee80211_input_print_task(void *arg1)
{
struct ieee80211printmsg *msg = arg1;
ieee80211_phymode_name[ieee80211_chan2mode(
ic, ic->ic_bss->ni_chan)]);
- task_set(&msg->task, ieee80211_input_print_task, msg, NULL);
+ task_set(&msg->task, ieee80211_input_print_task, msg);
task_add(systq, &msg->task);
}
-/* $OpenBSD: nd6.c,v 1.129 2015/01/08 14:29:18 mpi Exp $ */
+/* $OpenBSD: nd6.c,v 1.130 2015/01/27 03:17:36 dlg Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
struct timeout nd6_slowtimo_ch;
struct timeout nd6_timer_ch;
struct task nd6_timer_task;
-void nd6_timer_work(void *, void *);
+void nd6_timer_work(void *);
struct timeout nd6_rs_output_timer;
int nd6_rs_output_timeout = ND6_RS_OUTPUT_INTERVAL;
/* initialization of the default router list */
TAILQ_INIT(&nd_defrouter);
- task_set(&nd6_timer_task, nd6_timer_work, NULL, NULL);
+ task_set(&nd6_timer_task, nd6_timer_work, NULL);
nd6_init_done = 1;
* ND6 timer routine to expire default route list and prefix list
*/
void
-nd6_timer_work(void *ignored_arg1, void *ignored_arg2)
+nd6_timer_work(void *null)
{
int s;
struct nd_defrouter *dr, *ndr;
-/* $OpenBSD: nd6_rtr.c,v 1.96 2014/12/22 11:17:20 mpi Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.97 2015/01/27 03:17:36 dlg Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
int rt6_deleteroute(struct radix_node *, void *, u_int);
-void nd6_addr_add(void *, void *);
+void nd6_addr_add(void *);
extern int nd6_recalc_reachtm_interval;
new->ndpr_prefix.sin6_addr.s6_addr32[i] &=
new->ndpr_mask.s6_addr32[i];
- task_set(&new->ndpr_task, nd6_addr_add, new, NULL);
+ task_set(&new->ndpr_task, nd6_addr_add, new);
s = splsoftnet();
/* link ndpr_entry to nd_prefix list */
}
void
-nd6_addr_add(void *prptr, void *arg2)
+nd6_addr_add(void *prptr)
{
struct nd_prefix *pr = (struct nd_prefix *)prptr;
struct in6_ifaddr *ia6;
-/* $OpenBSD: scsi_base.c,v 1.217 2014/09/20 16:18:23 kettenis Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.218 2015/01/27 03:17:37 dlg Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
int how;
};
-void scsi_plug_probe(void *, void *);
-void scsi_plug_detach(void *, void *);
+void scsi_plug_probe(void *);
+void scsi_plug_detach(void *);
struct scsi_xfer * scsi_xs_io(struct scsi_link *, void *, int);
if (p == NULL)
return (ENOMEM);
- task_set(&p->task, scsi_plug_probe, p, NULL);
+ task_set(&p->task, scsi_plug_probe, p);
p->sc = sc;
p->target = target;
p->lun = lun;
if (p == NULL)
return (ENOMEM);
- task_set(&p->task, scsi_plug_detach, p, NULL);
+ task_set(&p->task, scsi_plug_detach, p);
p->sc = sc;
p->target = target;
p->lun = lun;
}
void
-scsi_plug_probe(void *xp, void *null)
+scsi_plug_probe(void *xp)
{
struct scsi_plug *p = xp;
struct scsibus_softc *sc = p->sc;
}
void
-scsi_plug_detach(void *xp, void *null)
+scsi_plug_detach(void *xp)
{
struct scsi_plug *p = xp;
struct scsibus_softc *sc = p->sc;
-/* $OpenBSD: task.h,v 1.6 2014/06/11 08:47:53 blambert Exp $ */
+/* $OpenBSD: task.h,v 1.7 2015/01/27 03:17:37 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
struct task {
TAILQ_ENTRY(task) t_entry;
- void (*t_func)(void *, void *);
- void *t_arg1;
- void *t_arg2;
+ void (*t_func)(void *);
+ void *t_arg;
unsigned int t_flags;
};
struct taskq *taskq_create(const char *, unsigned int, int);
void taskq_destroy(struct taskq *);
-void task_set(struct task *, void (*)(void *, void *),
- void *, void *);
+void task_set(struct task *, void (*)(void *), void *);
int task_add(struct taskq *, struct task *);
int task_del(struct taskq *, struct task *);
-#define TASK_INITIALIZER(_f, _a1, _a2) \
- { { NULL, NULL }, (_f), (_a1), (_a2), 0 }
+#define TASK_INITIALIZER(_f, _a) \
+ { { NULL, NULL }, (_f), (_a), 0 }
#endif /* _KERNEL */
-/* $OpenBSD: uvm_swap.c,v 1.133 2015/01/13 02:24:26 dlg Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.134 2015/01/27 03:17:37 dlg Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
void sw_reg_strategy(struct swapdev *, struct buf *, int);
void sw_reg_iodone(struct buf *);
-void sw_reg_iodone_internal(void *, void *);
+void sw_reg_iodone_internal(void *);
void sw_reg_start(struct swapdev *);
int uvm_swap_io(struct vm_page **, int, int, int);
/* patch it back to the vnx */
nbp->vb_vnx = vnx;
- task_set(&nbp->vb_task, sw_reg_iodone_internal, nbp, NULL);
+ task_set(&nbp->vb_task, sw_reg_iodone_internal, nbp);
s = splbio();
if (vnx->vx_error != 0) {
}
void
-sw_reg_iodone_internal(void *xvbp, void *null)
+sw_reg_iodone_internal(void *xvbp)
{
struct vndbuf *vbp = xvbp;
struct vndxfer *vnx = vbp->vb_vnx;