diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-14 14:41:24 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-08-15 11:06:49 -0700 |
commit | 5346fc5f36b5e7c55fc7b5cd46f1e4d7563a86a4 (patch) | |
tree | 3c4f341a6da05d6cc35cbd7124e750ed9c6ac96f /bsd-core/drm_lock.c | |
parent | 10f9b7bd0b471487371813083bd3481629b2a56f (diff) |
BSD: Replace brief description in each file's first line with doxygen later on.
The brief descriptions usually had the wrong filename in them.
Diffstat (limited to 'bsd-core/drm_lock.c')
-rw-r--r-- | bsd-core/drm_lock.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bsd-core/drm_lock.c b/bsd-core/drm_lock.c index 5acb13d3..326c083b 100644 --- a/bsd-core/drm_lock.c +++ b/bsd-core/drm_lock.c @@ -1,6 +1,3 @@ -/* lock.c -- IOCTLs for locking -*- linux-c -*- - * Created: Tue Feb 2 08:37:54 1999 by faith@valinux.com - */ /*- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. @@ -31,6 +28,25 @@ * */ +/** @file drm_lock.c + * Implementation of the ioctls and other support code for dealing with the + * hardware lock. + * + * The DRM hardware lock is a shared structure between the kernel and userland. + * + * On uncontended access where the new context was the last context, the + * client may take the lock without dropping down into the kernel, using atomic + * compare-and-set. + * + * If the client finds during compare-and-set that it was not the last owner + * of the lock, it calls the DRM lock ioctl, which may sleep waiting for the + * lock, and may have side-effects of kernel-managed context switching. + * + * When the client releases the lock, if the lock is marked as being contended + * by another client, then the DRM unlock ioctl is called so that the + * contending client may be woken up. + */ + #include "drmP.h" int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context) |