Skip to content
Snippets Groups Projects
Commit 6fc41e25 authored by Keith Whitwell's avatar Keith Whitwell
Browse files

Use spldrm/splx around tsleep() in DRM_WAIT_ON

parent 4d6d3572
No related merge requests found
......@@ -204,11 +204,13 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
while (!condition) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
if ( ret ) \
return ret; \
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
for ( ret = 0 ; !ret && !(condition) ; ) { \
int s = spldrm(); \
if (!(condition)) \
ret = tsleep( &(queue), PZERO | PCATCH, \
"drmwtq", (timeout) ); \
splx(s); \
}
#define DRM_WAKEUP( queue ) wakeup( queue )
......
......@@ -204,11 +204,13 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
while (!condition) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
if ( ret ) \
return ret; \
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
for ( ret = 0 ; !ret && !(condition) ; ) { \
int s = spldrm(); \
if (!(condition)) \
ret = tsleep( &(queue), PZERO | PCATCH, \
"drmwtq", (timeout) ); \
splx(s); \
}
#define DRM_WAKEUP( queue ) wakeup( queue )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment