aboutsummaryrefslogtreecommitdiff
path: root/bsd/drm_lists.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd/drm_lists.h')
-rw-r--r--bsd/drm_lists.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/bsd/drm_lists.h b/bsd/drm_lists.h
index 1ab55f90..578a99a3 100644
--- a/bsd/drm_lists.h
+++ b/bsd/drm_lists.h
@@ -43,7 +43,7 @@ int DRM(waitlist_create)(drm_waitlist_t *bl, int count)
if(!bl->bufs) return DRM_ERR(ENOMEM);
- memset(bl->bufs, 0, sizeof(*bl->bufs));
+ bzero(bl->bufs, sizeof(*bl->bufs));
bl->count = count;
bl->rp = bl->bufs;
@@ -66,6 +66,8 @@ int DRM(waitlist_destroy)(drm_waitlist_t *bl)
bl->rp = NULL;
bl->wp = NULL;
bl->end = NULL;
+ DRM_SPINUNINIT( bl->write_lock );
+ DRM_SPINUNINIT( bl->read_lock );
return 0;
}
@@ -137,6 +139,7 @@ int DRM(freelist_destroy)(drm_freelist_t *bl)
{
atomic_set(&bl->count, 0);
bl->next = NULL;
+ DRM_SPINUNINIT( bl->lock );
return 0;
}
@@ -175,7 +178,7 @@ int DRM(freelist_put)(drm_device_t *dev, drm_freelist_t *bl, drm_buf_t *buf)
/* Check for high water mark */
if (atomic_read(&bl->wfh) && atomic_read(&bl->count)>=bl->high_mark) {
atomic_set(&bl->wfh, 0);
- DRM_WAKEUP_INT(&bl->waiting);
+ DRM_WAKEUP_INT((void *)&bl->waiting);
}
return 0;
}
@@ -222,7 +225,7 @@ drm_buf_t *DRM(freelist_get)(drm_freelist_t *bl, int block)
for (;;) {
if (!atomic_read(&bl->wfh)
&& (buf = DRM(freelist_try(bl)))) break;
- error = tsleep(&bl->waiting, PZERO|PCATCH,
+ error = tsleep((void *)&bl->waiting, PZERO|PCATCH,
"drmfg", 0);
if (error)
break;