FreeBSD/sys/dev/drm/drm_context.c
/* ================================================================
 * The actual DRM context handling routines
 */
The actual DRM context handling routines
The actual DRM context handling routines
int drm_context_switch(struct drm_device *dev, int old, int new)
{
	if (test_and_set_bit(0, &dev->context_flag)) {
		DRM_ERROR("Reentering -- FIXME\n");
		return EBUSY;
	}
	DRM_DEBUG("Context switch from %d to %d\n", old, new);
	if (new == dev->last_context) {
		clear_bit(0, &dev->context_flag);
		return 0;
	}
	return 0;
}
int drm_context_switch ( struct drm_device * dev , int old , int new ) { if ( test_and_set_bit ( 0 , & dev -> context_flag ) ) { DRM_ERROR ( " \n " ) ; return EBUSY ; } DRM_DEBUG ( " \n " , old , new ) ; if ( new == dev -> last_context ) { clear_bit ( 0 , & dev -> context_flag ) ; return 0 ; } return 0 ; }
The actual DRM context handling routines
The actual DRM context handling routines