summaryrefslogtreecommitdiff
path: root/bsd/drm_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd/drm_context.h')
-rw-r--r--bsd/drm_context.h36
1 files changed, 18 insertions, 18 deletions
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);
}