mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-31 16:00:16 +01:00
Use spldrm/splx around tsleep() in DRM_WAIT_ON
This commit is contained in:
parent
4d6d357202
commit
6fc41e25e5
2 changed files with 14 additions and 10 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue