Skip to contentSkip to conversation

char/drm_os_linux: replace

PATCH In review Nishanth Aravamudan 1 participant 2 messages Sep 15, 2004 – Sep 16, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/33 char/drm_os_linux: replace

Any comments would be appreciated.

Description: Use set_current_state() instead of direct assignment of current->state.

drivers/char/drm/drm_os_linux.h +1 -1
@@ -134,7 +134,7 @@ do {								\
 	add_wait_queue(&(queue), &entry);			\
 								\
 	for (;;) {						\
-		current->state = TASK_INTERRUPTIBLE;		\
+		set_current_state(TASK_INTERRUPTIBLE);		\
 		if (condition)					\
 			break;					\
 		if (time_after_eq(jiffies, end)) {		\

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 3/33 char/drm_os_linux: replace

Re-submission of patch incorporating Alan Cox's suggestion of using __set_current_state() and changing the other direct assignment in the macro.

Thanks,
Nish

Description: Use set_current_state() instead of direct assignment of current->state.

drivers/char/drm/drm_os_linux.h +2 -2
@@ -134,7 +134,7 @@ do {								\
 	add_wait_queue(&(queue), &entry);			\
 								\
 	for (;;) {						\
-		current->state = TASK_INTERRUPTIBLE;		\
+		__set_current_state(TASK_INTERRUPTIBLE);		\
 		if (condition)					\
 			break;					\
 		if (time_after_eq(jiffies, end)) {		\
@@ -147,7 +147,7 @@ do {								\
 			break;					\
 		}						\
 	}							\
-	current->state = TASK_RUNNING;				\
+	__set_current_state(TASK_RUNNING);			\
 	remove_wait_queue(&(queue), &entry);			\
 } while (0)
 

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors