summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-core/drm_auth.c14
-rw-r--r--bsd-core/drm_bufs.c48
-rw-r--r--bsd-core/drm_context.c36
-rw-r--r--bsd-core/drm_dma.c18
-rw-r--r--bsd-core/drm_drv.c8
-rw-r--r--bsd-core/drm_fops.c4
-rw-r--r--bsd-core/drm_ioctl.c16
-rw-r--r--bsd-core/drm_os_freebsd.h4
-rw-r--r--bsd-core/drm_os_netbsd.h4
-rw-r--r--bsd-core/drm_sysctl.c12
-rw-r--r--bsd/drm_auth.h14
-rw-r--r--bsd/drm_bufs.h48
-rw-r--r--bsd/drm_context.h36
-rw-r--r--bsd/drm_dma.h18
-rw-r--r--bsd/drm_drv.h8
-rw-r--r--bsd/drm_fops.h4
-rw-r--r--bsd/drm_ioctl.h16
-rw-r--r--bsd/drm_os_freebsd.h4
-rw-r--r--bsd/drm_os_netbsd.h4
-rw-r--r--bsd/drm_sysctl.h12
20 files changed, 164 insertions, 164 deletions
diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c
index 67ab6a12..6f819ad8 100644
--- a/bsd-core/drm_auth.c
+++ b/bsd-core/drm_auth.c
@@ -43,14 +43,14 @@ static drm_file_t *DRM(find_file)(drm_device_t *dev, drm_magic_t magic)
drm_magic_entry_t *pt;
int hash = DRM(hash_magic)(magic);
- DRM_LOCK;
+ DRM_LOCK();
for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
if (pt->magic == magic) {
retval = pt->priv;
break;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return retval;
}
@@ -69,7 +69,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
entry->priv = priv;
entry->next = NULL;
- DRM_LOCK;
+ DRM_LOCK();
if (dev->magiclist[hash].tail) {
dev->magiclist[hash].tail->next = entry;
dev->magiclist[hash].tail = entry;
@@ -77,7 +77,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
dev->magiclist[hash].head = entry;
dev->magiclist[hash].tail = entry;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -91,7 +91,7 @@ int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic)
DRM_DEBUG("%d\n", magic);
hash = DRM(hash_magic)(magic);
- DRM_LOCK;
+ DRM_LOCK();
for (pt = dev->magiclist[hash].head; pt; prev = pt, pt = pt->next) {
if (pt->magic == magic) {
if (dev->magiclist[hash].head == pt) {
@@ -103,11 +103,11 @@ int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic)
if (prev) {
prev->next = pt->next;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM(free)(pt, sizeof(*pt), DRM_MEM_MAGIC);
return DRM_ERR(EINVAL);
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 93189f92..5314f303 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -178,9 +178,9 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
}
list->map = map;
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_INSERT_TAIL(dev->maplist, list, link);
- DRM_UNLOCK;
+ DRM_UNLOCK();
request.offset = map->offset;
request.size = map->size;
@@ -212,7 +212,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_map_t *)data, sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(list, dev->maplist, link) {
map = list->map;
if (map->handle == request.handle &&
@@ -222,7 +222,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
/* No match found. */
if (list == NULL) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
TAILQ_REMOVE(dev->maplist, list, link);
@@ -268,7 +268,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
break;
}
DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -353,17 +353,17 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER )
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
DRM_MEM_BUFS );
if ( !entry->buflist ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
@@ -394,7 +394,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -413,7 +413,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
if (temp_buflist == NULL) {
/* Free the entry because it isn't valid */
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -428,7 +428,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
@@ -475,10 +475,10 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
total = PAGE_SIZE << page_order;
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
@@ -503,7 +503,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_MEM_SEGS);
DRM(free)(entry->seglist_bus, count *
sizeof(*entry->seglist_bus), DRM_MEM_SEGS);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -532,7 +532,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) * sizeof(*dma->pagelist),
DRM_MEM_PAGES);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -571,7 +571,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) *
sizeof(*dma->pagelist), DRM_MEM_PAGES );
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
bzero(buf->dev_private, buf->dev_priv_size);
@@ -593,7 +593,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) * sizeof(*dma->pagelist),
DRM_MEM_PAGES);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -614,7 +614,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
dma->page_count += entry->seg_count << page_order;
dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order);
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
@@ -665,17 +665,17 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER )
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
DRM_MEM_BUFS );
if ( !entry->buflist ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
@@ -706,7 +706,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -728,7 +728,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
if (temp_buflist == NULL) {
/* Free the entry because it isn't valid */
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -743,7 +743,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
diff --git a/bsd-core/drm_context.c b/bsd-core/drm_context.c
index 04bb005f..3cb5992a 100644
--- a/bsd-core/drm_context.c
+++ b/bsd-core/drm_context.c
@@ -49,10 +49,10 @@ void DRM(ctxbitmap_free)( drm_device_t *dev, int ctx_handle )
return;
}
- DRM_LOCK;
+ DRM_LOCK();
clear_bit(ctx_handle, dev->ctx_bitmap);
dev->context_sareas[ctx_handle] = NULL;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return;
}
@@ -63,10 +63,10 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
if (dev->ctx_bitmap == NULL)
return -1;
- DRM_LOCK;
+ DRM_LOCK();
bit = find_first_zero_bit( dev->ctx_bitmap, DRM_MAX_CTXBITMAP );
if (bit >= DRM_MAX_CTXBITMAP) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
@@ -85,7 +85,7 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
DRM_MEM_MAPS);
if (ctx_sareas == NULL) {
clear_bit(bit, dev->ctx_bitmap);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
dev->context_sareas = ctx_sareas;
@@ -96,13 +96,13 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
sizeof(*dev->context_sareas), DRM_MEM_MAPS);
if (dev->context_sareas == NULL) {
clear_bit(bit, dev->ctx_bitmap);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
dev->context_sareas[bit] = NULL;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return bit;
}
@@ -111,16 +111,16 @@ int DRM(ctxbitmap_init)( drm_device_t *dev )
int i;
int temp;
- DRM_LOCK;
+ DRM_LOCK();
dev->ctx_bitmap = (atomic_t *)DRM(calloc)(1, PAGE_SIZE,
DRM_MEM_CTXBITMAP);
if ( dev->ctx_bitmap == NULL ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dev->context_sareas = NULL;
dev->max_context = -1;
- DRM_UNLOCK;
+ DRM_UNLOCK();
for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
temp = DRM(ctxbitmap_next)( dev );
@@ -132,12 +132,12 @@ int DRM(ctxbitmap_init)( drm_device_t *dev )
void DRM(ctxbitmap_cleanup)( drm_device_t *dev )
{
- DRM_LOCK;
+ DRM_LOCK();
if (dev->context_sareas != NULL)
DRM(free)(dev->context_sareas, sizeof(*dev->context_sareas) *
dev->max_context, DRM_MEM_MAPS);
DRM(free)( (void *)dev->ctx_bitmap, PAGE_SIZE, DRM_MEM_CTXBITMAP );
- DRM_UNLOCK;
+ DRM_UNLOCK();
}
/* ================================================================
@@ -153,14 +153,14 @@ int DRM(getsareactx)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_ctx_priv_map_t *)data,
sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
if (dev->max_context < 0 || request.ctx_id >= (unsigned) dev->max_context) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
map = dev->context_sareas[request.ctx_id];
- DRM_UNLOCK;
+ DRM_UNLOCK();
request.handle = map->handle;
@@ -179,7 +179,7 @@ int DRM(setsareactx)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_ctx_priv_map_t *)data,
sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(list, dev->maplist, link) {
map=list->map;
if (map->handle == request.handle) {
@@ -188,13 +188,13 @@ int DRM(setsareactx)( DRM_IOCTL_ARGS )
if (request.ctx_id >= (unsigned) dev->max_context)
goto bad;
dev->context_sareas[request.ctx_id] = map;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
}
bad:
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c
index 21036f71..6c502efb 100644
--- a/bsd-core/drm_dma.c
+++ b/bsd-core/drm_dma.c
@@ -159,13 +159,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
if ( irq == 0 || dev->dev_private == NULL)
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
if ( dev->irq ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EBUSY);
}
dev->irq = irq;
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, irq );
@@ -195,10 +195,10 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
#elif defined(__NetBSD__)
if (pci_intr_map(&dev->pa, &dev->ih) != 0) {
#endif
- DRM_LOCK;
+ DRM_LOCK();
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ENOENT;
}
@@ -216,13 +216,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
(irqreturn_t (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
if ( !dev->irqh ) {
#endif
- DRM_LOCK;
+ DRM_LOCK();
#ifdef __FreeBSD__
bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, dev->irqr);
#endif
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return retcode;
}
@@ -237,12 +237,12 @@ int DRM(irq_uninstall)( drm_device_t *dev )
int irq;
int irqrid;
- DRM_LOCK;
+ DRM_LOCK();
irq = dev->irq;
irqrid = dev->irqrid;
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
if ( !irq )
return DRM_ERR(EINVAL);
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index fd37d9e0..66917668 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -517,7 +517,7 @@ static int DRM(takedown)( drm_device_t *dev )
DRM(irq_uninstall)( dev );
#endif
- DRM_LOCK;
+ DRM_LOCK();
callout_stop( &dev->timer );
if ( dev->unique ) {
@@ -627,7 +627,7 @@ static int DRM(takedown)( drm_device_t *dev )
dev->lock.filp = NULL;
DRM_WAKEUP_INT((void *)&dev->lock.lock_queue);
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -935,7 +935,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
dev->buf_pgid = 0;
#endif /* __NetBSD__ */
- DRM_LOCK;
+ DRM_LOCK();
priv = DRM(find_file_by_proc)(dev, p);
if (priv) {
priv->refs--;
@@ -944,7 +944,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
/* ========================================================
diff --git a/bsd-core/drm_fops.c b/bsd-core/drm_fops.c
index 0ebf6ee4..b44254b8 100644
--- a/bsd-core/drm_fops.c
+++ b/bsd-core/drm_fops.c
@@ -84,9 +84,9 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
priv->devXX = dev;
priv->ioctl_count = 0;
priv->authenticated = !DRM_SUSER(p);
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_INSERT_TAIL(&dev->files, priv, link);
- DRM_UNLOCK;
+ DRM_UNLOCK();
}
#ifdef __FreeBSD__
kdev->si_drv1 = dev;
diff --git a/bsd-core/drm_ioctl.c b/bsd-core/drm_ioctl.c
index b9598b4e..a195d0c4 100644
--- a/bsd-core/drm_ioctl.c
+++ b/bsd-core/drm_ioctl.c
@@ -138,9 +138,9 @@ int DRM(getmap)( DRM_IOCTL_ARGS )
idx = map.offset;
- DRM_LOCK;
+ DRM_LOCK();
if (idx < 0) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
@@ -158,7 +158,7 @@ int DRM(getmap)( DRM_IOCTL_ARGS )
i++;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
if (!list)
return EINVAL;
@@ -179,7 +179,7 @@ int DRM(getclient)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( client, (drm_client_t *)data, sizeof(client) );
idx = client.idx;
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(pt, &dev->files, link) {
if (i==idx)
{
@@ -188,14 +188,14 @@ int DRM(getclient)( DRM_IOCTL_ARGS )
client.uid = pt->uid;
client.magic = pt->magic;
client.iocs = pt->ioctl_count;
- DRM_UNLOCK;
+ DRM_UNLOCK();
*(drm_client_t *)data = client;
return 0;
}
i++;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_COPY_TO_USER_IOCTL( (drm_client_t *)data, client, sizeof(client) );
@@ -210,7 +210,7 @@ int DRM(getstats)( DRM_IOCTL_ARGS )
memset(&stats, 0, sizeof(stats));
- DRM_LOCK;
+ DRM_LOCK();
for (i = 0; i < dev->counters; i++) {
if (dev->types[i] == _DRM_STAT_LOCK)
@@ -224,7 +224,7 @@ int DRM(getstats)( DRM_IOCTL_ARGS )
stats.count = dev->counters;
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_COPY_TO_USER_IOCTL( (drm_stats_t *)data, stats, sizeof(stats) );
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h
index a14383d7..0bb38ba2 100644
--- a/bsd-core/drm_os_freebsd.h
+++ b/bsd-core/drm_os_freebsd.h
@@ -139,8 +139,8 @@
* code for that is not yet written */
#define DRMFILE void *
#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
-#define DRM_LOCK lockmgr(&dev->dev_lock, LK_EXCLUSIVE, 0, DRM_CURPROC)
-#define DRM_UNLOCK lockmgr(&dev->dev_lock, LK_RELEASE, 0, DRM_CURPROC)
+#define DRM_LOCK() lockmgr(&dev->dev_lock, LK_EXCLUSIVE, 0, DRM_CURPROC)
+#define DRM_UNLOCK() lockmgr(&dev->dev_lock, LK_RELEASE, 0, DRM_CURPROC)
#define DRM_SUSER(p) suser(p)
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
diff --git a/bsd-core/drm_os_netbsd.h b/bsd-core/drm_os_netbsd.h
index 8053f874..1290e848 100644
--- a/bsd-core/drm_os_netbsd.h
+++ b/bsd-core/drm_os_netbsd.h
@@ -112,8 +112,8 @@ extern struct cfdriver DRM(cd);
* code for that is not yet written */
#define DRMFILE void *
#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
-#define DRM_LOCK lockmgr(&dev->dev_lock, LK_EXCLUSIVE, NULL)
-#define DRM_UNLOCK lockmgr(&dev->dev_lock, LK_RELEASE, NULL)
+#define DRM_LOCK() lockmgr(&dev->dev_lock, LK_EXCLUSIVE, NULL)
+#define DRM_UNLOCK() lockmgr(&dev->dev_lock, LK_RELEASE, NULL)
#define DRM_SUSER(p) suser(p->p_ucred, &p->p_acflag)
#define DRM_TASKQUEUE_ARGS void *dev, int pending
#define DRM_IRQ_ARGS void *arg
diff --git a/bsd-core/drm_sysctl.c b/bsd-core/drm_sysctl.c
index 36b81daa..270b3947 100644
--- a/bsd-core/drm_sysctl.c
+++ b/bsd-core/drm_sysctl.c
@@ -176,9 +176,9 @@ static int DRM(vm_info)DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_vm_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}
@@ -228,9 +228,9 @@ static int DRM(bufs_info) DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_bufs_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}
@@ -262,9 +262,9 @@ static int DRM(clients_info)DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_clients_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}
diff --git a/bsd/drm_auth.h b/bsd/drm_auth.h
index 67ab6a12..6f819ad8 100644
--- a/bsd/drm_auth.h
+++ b/bsd/drm_auth.h
@@ -43,14 +43,14 @@ static drm_file_t *DRM(find_file)(drm_device_t *dev, drm_magic_t magic)
drm_magic_entry_t *pt;
int hash = DRM(hash_magic)(magic);
- DRM_LOCK;
+ DRM_LOCK();
for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
if (pt->magic == magic) {
retval = pt->priv;
break;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return retval;
}
@@ -69,7 +69,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
entry->priv = priv;
entry->next = NULL;
- DRM_LOCK;
+ DRM_LOCK();
if (dev->magiclist[hash].tail) {
dev->magiclist[hash].tail->next = entry;
dev->magiclist[hash].tail = entry;
@@ -77,7 +77,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic)
dev->magiclist[hash].head = entry;
dev->magiclist[hash].tail = entry;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -91,7 +91,7 @@ int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic)
DRM_DEBUG("%d\n", magic);
hash = DRM(hash_magic)(magic);
- DRM_LOCK;
+ DRM_LOCK();
for (pt = dev->magiclist[hash].head; pt; prev = pt, pt = pt->next) {
if (pt->magic == magic) {
if (dev->magiclist[hash].head == pt) {
@@ -103,11 +103,11 @@ int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic)
if (prev) {
prev->next = pt->next;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM(free)(pt, sizeof(*pt), DRM_MEM_MAGIC);
return DRM_ERR(EINVAL);
diff --git a/bsd/drm_bufs.h b/bsd/drm_bufs.h
index 93189f92..5314f303 100644
--- a/bsd/drm_bufs.h
+++ b/bsd/drm_bufs.h
@@ -178,9 +178,9 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
}
list->map = map;
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_INSERT_TAIL(dev->maplist, list, link);
- DRM_UNLOCK;
+ DRM_UNLOCK();
request.offset = map->offset;
request.size = map->size;
@@ -212,7 +212,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_map_t *)data, sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(list, dev->maplist, link) {
map = list->map;
if (map->handle == request.handle &&
@@ -222,7 +222,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
/* No match found. */
if (list == NULL) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
TAILQ_REMOVE(dev->maplist, list, link);
@@ -268,7 +268,7 @@ int DRM(rmmap)( DRM_IOCTL_ARGS )
break;
}
DRM(free)(map, sizeof(*map), DRM_MEM_MAPS);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -353,17 +353,17 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER )
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
DRM_MEM_BUFS );
if ( !entry->buflist ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
@@ -394,7 +394,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -413,7 +413,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
if (temp_buflist == NULL) {
/* Free the entry because it isn't valid */
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -428,7 +428,7 @@ static int DRM(addbufs_agp)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
@@ -475,10 +475,10 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
page_order = order - PAGE_SHIFT > 0 ? order - PAGE_SHIFT : 0;
total = PAGE_SIZE << page_order;
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
@@ -503,7 +503,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_MEM_SEGS);
DRM(free)(entry->seglist_bus, count *
sizeof(*entry->seglist_bus), DRM_MEM_SEGS);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -532,7 +532,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) * sizeof(*dma->pagelist),
DRM_MEM_PAGES);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -571,7 +571,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) *
sizeof(*dma->pagelist), DRM_MEM_PAGES );
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
bzero(buf->dev_private, buf->dev_priv_size);
@@ -593,7 +593,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
DRM(free)(temp_pagelist, (dma->page_count +
(count << page_order)) * sizeof(*dma->pagelist),
DRM_MEM_PAGES);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -614,7 +614,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
dma->page_count += entry->seg_count << page_order;
dma->byte_count += PAGE_SIZE * (entry->seg_count << page_order);
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
@@ -665,17 +665,17 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
if ( order < DRM_MIN_ORDER || order > DRM_MAX_ORDER )
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
entry = &dma->bufs[order];
if ( entry->buf_count ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM); /* May only call once for each order */
}
entry->buflist = DRM(alloc)( count * sizeof(*entry->buflist),
DRM_MEM_BUFS );
if ( !entry->buflist ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
memset( entry->buflist, 0, count * sizeof(*entry->buflist) );
@@ -706,7 +706,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
@@ -728,7 +728,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
if (temp_buflist == NULL) {
/* Free the entry because it isn't valid */
DRM(cleanup_buf_error)(dev, entry);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dma->buflist = temp_buflist;
@@ -743,7 +743,7 @@ static int DRM(addbufs_sg)(drm_device_t *dev, drm_buf_desc_t *request)
DRM_DEBUG( "dma->buf_count : %d\n", dma->buf_count );
DRM_DEBUG( "entry->buf_count : %d\n", entry->buf_count );
- DRM_UNLOCK;
+ DRM_UNLOCK();
request->count = entry->buf_count;
request->size = size;
diff --git a/bsd/drm_context.h b/bsd/drm_context.h
index 04bb005f..3cb5992a 100644
--- a/bsd/drm_context.h
+++ b/bsd/drm_context.h
@@ -49,10 +49,10 @@ void DRM(ctxbitmap_free)( drm_device_t *dev, int ctx_handle )
return;
}
- DRM_LOCK;
+ DRM_LOCK();
clear_bit(ctx_handle, dev->ctx_bitmap);
dev->context_sareas[ctx_handle] = NULL;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return;
}
@@ -63,10 +63,10 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
if (dev->ctx_bitmap == NULL)
return -1;
- DRM_LOCK;
+ DRM_LOCK();
bit = find_first_zero_bit( dev->ctx_bitmap, DRM_MAX_CTXBITMAP );
if (bit >= DRM_MAX_CTXBITMAP) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
@@ -85,7 +85,7 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
DRM_MEM_MAPS);
if (ctx_sareas == NULL) {
clear_bit(bit, dev->ctx_bitmap);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
dev->context_sareas = ctx_sareas;
@@ -96,13 +96,13 @@ int DRM(ctxbitmap_next)( drm_device_t *dev )
sizeof(*dev->context_sareas), DRM_MEM_MAPS);
if (dev->context_sareas == NULL) {
clear_bit(bit, dev->ctx_bitmap);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return -1;
}
dev->context_sareas[bit] = NULL;
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return bit;
}
@@ -111,16 +111,16 @@ int DRM(ctxbitmap_init)( drm_device_t *dev )
int i;
int temp;
- DRM_LOCK;
+ DRM_LOCK();
dev->ctx_bitmap = (atomic_t *)DRM(calloc)(1, PAGE_SIZE,
DRM_MEM_CTXBITMAP);
if ( dev->ctx_bitmap == NULL ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(ENOMEM);
}
dev->context_sareas = NULL;
dev->max_context = -1;
- DRM_UNLOCK;
+ DRM_UNLOCK();
for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
temp = DRM(ctxbitmap_next)( dev );
@@ -132,12 +132,12 @@ int DRM(ctxbitmap_init)( drm_device_t *dev )
void DRM(ctxbitmap_cleanup)( drm_device_t *dev )
{
- DRM_LOCK;
+ DRM_LOCK();
if (dev->context_sareas != NULL)
DRM(free)(dev->context_sareas, sizeof(*dev->context_sareas) *
dev->max_context, DRM_MEM_MAPS);
DRM(free)( (void *)dev->ctx_bitmap, PAGE_SIZE, DRM_MEM_CTXBITMAP );
- DRM_UNLOCK;
+ DRM_UNLOCK();
}
/* ================================================================
@@ -153,14 +153,14 @@ int DRM(getsareactx)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_ctx_priv_map_t *)data,
sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
if (dev->max_context < 0 || request.ctx_id >= (unsigned) dev->max_context) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
map = dev->context_sareas[request.ctx_id];
- DRM_UNLOCK;
+ DRM_UNLOCK();
request.handle = map->handle;
@@ -179,7 +179,7 @@ int DRM(setsareactx)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( request, (drm_ctx_priv_map_t *)data,
sizeof(request) );
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(list, dev->maplist, link) {
map=list->map;
if (map->handle == request.handle) {
@@ -188,13 +188,13 @@ int DRM(setsareactx)( DRM_IOCTL_ARGS )
if (request.ctx_id >= (unsigned) dev->max_context)
goto bad;
dev->context_sareas[request.ctx_id] = map;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
}
bad:
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h
index 21036f71..6c502efb 100644
--- a/bsd/drm_dma.h
+++ b/bsd/drm_dma.h
@@ -159,13 +159,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
if ( irq == 0 || dev->dev_private == NULL)
return DRM_ERR(EINVAL);
- DRM_LOCK;
+ DRM_LOCK();
if ( dev->irq ) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EBUSY);
}
dev->irq = irq;
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_DEBUG( "%s: irq=%d\n", __FUNCTION__, irq );
@@ -195,10 +195,10 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
#elif defined(__NetBSD__)
if (pci_intr_map(&dev->pa, &dev->ih) != 0) {
#endif
- DRM_LOCK;
+ DRM_LOCK();
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ENOENT;
}
@@ -216,13 +216,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
(irqreturn_t (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
if ( !dev->irqh ) {
#endif
- DRM_LOCK;
+ DRM_LOCK();
#ifdef __FreeBSD__
bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid, dev->irqr);
#endif
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
return retcode;
}
@@ -237,12 +237,12 @@ int DRM(irq_uninstall)( drm_device_t *dev )
int irq;
int irqrid;
- DRM_LOCK;
+ DRM_LOCK();
irq = dev->irq;
irqrid = dev->irqrid;
dev->irq = 0;
dev->irqrid = 0;
- DRM_UNLOCK;
+ DRM_UNLOCK();
if ( !irq )
return DRM_ERR(EINVAL);
diff --git a/bsd/drm_drv.h b/bsd/drm_drv.h
index fd37d9e0..66917668 100644
--- a/bsd/drm_drv.h
+++ b/bsd/drm_drv.h
@@ -517,7 +517,7 @@ static int DRM(takedown)( drm_device_t *dev )
DRM(irq_uninstall)( dev );
#endif
- DRM_LOCK;
+ DRM_LOCK();
callout_stop( &dev->timer );
if ( dev->unique ) {
@@ -627,7 +627,7 @@ static int DRM(takedown)( drm_device_t *dev )
dev->lock.filp = NULL;
DRM_WAKEUP_INT((void *)&dev->lock.lock_queue);
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
return 0;
}
@@ -935,7 +935,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
dev->buf_pgid = 0;
#endif /* __NetBSD__ */
- DRM_LOCK;
+ DRM_LOCK();
priv = DRM(find_file_by_proc)(dev, p);
if (priv) {
priv->refs--;
@@ -944,7 +944,7 @@ int DRM(close)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p)
DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES );
}
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
/* ========================================================
diff --git a/bsd/drm_fops.h b/bsd/drm_fops.h
index 0ebf6ee4..b44254b8 100644
--- a/bsd/drm_fops.h
+++ b/bsd/drm_fops.h
@@ -84,9 +84,9 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
priv->devXX = dev;
priv->ioctl_count = 0;
priv->authenticated = !DRM_SUSER(p);
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_INSERT_TAIL(&dev->files, priv, link);
- DRM_UNLOCK;
+ DRM_UNLOCK();
}
#ifdef __FreeBSD__
kdev->si_drv1 = dev;
diff --git a/bsd/drm_ioctl.h b/bsd/drm_ioctl.h
index b9598b4e..a195d0c4 100644
--- a/bsd/drm_ioctl.h
+++ b/bsd/drm_ioctl.h
@@ -138,9 +138,9 @@ int DRM(getmap)( DRM_IOCTL_ARGS )
idx = map.offset;
- DRM_LOCK;
+ DRM_LOCK();
if (idx < 0) {
- DRM_UNLOCK;
+ DRM_UNLOCK();
return DRM_ERR(EINVAL);
}
@@ -158,7 +158,7 @@ int DRM(getmap)( DRM_IOCTL_ARGS )
i++;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
if (!list)
return EINVAL;
@@ -179,7 +179,7 @@ int DRM(getclient)( DRM_IOCTL_ARGS )
DRM_COPY_FROM_USER_IOCTL( client, (drm_client_t *)data, sizeof(client) );
idx = client.idx;
- DRM_LOCK;
+ DRM_LOCK();
TAILQ_FOREACH(pt, &dev->files, link) {
if (i==idx)
{
@@ -188,14 +188,14 @@ int DRM(getclient)( DRM_IOCTL_ARGS )
client.uid = pt->uid;
client.magic = pt->magic;
client.iocs = pt->ioctl_count;
- DRM_UNLOCK;
+ DRM_UNLOCK();
*(drm_client_t *)data = client;
return 0;
}
i++;
}
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_COPY_TO_USER_IOCTL( (drm_client_t *)data, client, sizeof(client) );
@@ -210,7 +210,7 @@ int DRM(getstats)( DRM_IOCTL_ARGS )
memset(&stats, 0, sizeof(stats));
- DRM_LOCK;
+ DRM_LOCK();
for (i = 0; i < dev->counters; i++) {
if (dev->types[i] == _DRM_STAT_LOCK)
@@ -224,7 +224,7 @@ int DRM(getstats)( DRM_IOCTL_ARGS )
stats.count = dev->counters;
- DRM_UNLOCK;
+ DRM_UNLOCK();
DRM_COPY_TO_USER_IOCTL( (drm_stats_t *)data, stats, sizeof(stats) );
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index a14383d7..0bb38ba2 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -139,8 +139,8 @@
* code for that is not yet written */
#define DRMFILE void *
#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
-#define DRM_LOCK lockmgr(&dev->dev_lock, LK_EXCLUSIVE, 0, DRM_CURPROC)
-#define DRM_UNLOCK lockmgr(&dev->dev_lock, LK_RELEASE, 0, DRM_CURPROC)
+#define DRM_LOCK() lockmgr(&dev->dev_lock, LK_EXCLUSIVE, 0, DRM_CURPROC)
+#define DRM_UNLOCK() lockmgr(&dev->dev_lock, LK_RELEASE, 0, DRM_CURPROC)
#define DRM_SUSER(p) suser(p)
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
diff --git a/bsd/drm_os_netbsd.h b/bsd/drm_os_netbsd.h
index 8053f874..1290e848 100644
--- a/bsd/drm_os_netbsd.h
+++ b/bsd/drm_os_netbsd.h
@@ -112,8 +112,8 @@ extern struct cfdriver DRM(cd);
* code for that is not yet written */
#define DRMFILE void *
#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp
-#define DRM_LOCK lockmgr(&dev->dev_lock, LK_EXCLUSIVE, NULL)
-#define DRM_UNLOCK lockmgr(&dev->dev_lock, LK_RELEASE, NULL)
+#define DRM_LOCK() lockmgr(&dev->dev_lock, LK_EXCLUSIVE, NULL)
+#define DRM_UNLOCK() lockmgr(&dev->dev_lock, LK_RELEASE, NULL)
#define DRM_SUSER(p) suser(p->p_ucred, &p->p_acflag)
#define DRM_TASKQUEUE_ARGS void *dev, int pending
#define DRM_IRQ_ARGS void *arg
diff --git a/bsd/drm_sysctl.h b/bsd/drm_sysctl.h
index 36b81daa..270b3947 100644
--- a/bsd/drm_sysctl.h
+++ b/bsd/drm_sysctl.h
@@ -176,9 +176,9 @@ static int DRM(vm_info)DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_vm_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}
@@ -228,9 +228,9 @@ static int DRM(bufs_info) DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_bufs_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}
@@ -262,9 +262,9 @@ static int DRM(clients_info)DRM_SYSCTL_HANDLER_ARGS
drm_device_t *dev = arg1;
int ret;
- DRM_LOCK;
+ DRM_LOCK();
ret = DRM(_clients_info)(oidp, arg1, arg2, req);
- DRM_UNLOCK;
+ DRM_UNLOCK();
return ret;
}