proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / dev / agp / agp.c
index 5ca1cc2..4096a15 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/pci/agp.c,v 1.3.2.4 2002/08/11 19:58:12 alc Exp $
- *     $DragonFly: src/sys/dev/agp/agp.c,v 1.3 2003/06/23 17:55:49 dillon Exp $
+ *     $DragonFly: src/sys/dev/agp/agp.c,v 1.4 2003/06/25 03:56:09 dillon Exp $
  */
 
 #include "opt_bus.h"
@@ -271,7 +271,7 @@ agp_generic_detach(device_t dev)
 {
        struct agp_softc *sc = device_get_softc(dev);
        bus_release_resource(dev, SYS_RES_MEMORY, AGP_APBASE, sc->as_aperture);
-       lockmgr(&sc->as_lock, LK_DRAIN, 0, curproc);
+       lockmgr(&sc->as_lock, LK_DRAIN, 0, curthread); /* XXX */
        destroy_dev(sc->as_devnode);
        agp_flush_cache();
        return 0;
@@ -389,7 +389,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
        vm_page_t m;
        int error;
 
-       lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0, curproc);
+       lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0, curthread); /* XXX */
 
        if (mem->am_is_bound) {
                device_printf(dev, "memory already bound\n");
@@ -452,7 +452,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
                                                           OFF_TO_IDX(k));
                                        vm_page_unwire(m, 0);
                                }
-                               lockmgr(&sc->as_lock, LK_RELEASE, 0, curproc);
+                               lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread); /* XXX */
                                return error;
                        }
                }
@@ -473,7 +473,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
        mem->am_offset = offset;
        mem->am_is_bound = 1;
 
-       lockmgr(&sc->as_lock, LK_RELEASE, 0, curproc);
+       lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread); /* XXX */
 
        return 0;
 }
@@ -485,7 +485,7 @@ agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
        vm_page_t m;
        int i;
 
-       lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0, curproc);
+       lockmgr(&sc->as_lock, LK_EXCLUSIVE, 0, curthread); /* XXX */
 
        if (!mem->am_is_bound) {
                device_printf(dev, "memory is not bound\n");
@@ -510,7 +510,7 @@ agp_generic_unbind_memory(device_t dev, struct agp_memory *mem)
        mem->am_offset = 0;
        mem->am_is_bound = 0;
 
-       lockmgr(&sc->as_lock, LK_RELEASE, 0, curproc);
+       lockmgr(&sc->as_lock, LK_RELEASE, 0, curthread); /* XXX */
 
        return 0;
 }