task->state cleanups part 11
Subsystems (2)
PATCH 1/1 task->state cleanups part 11
2Marcelo: the whole cleanup tree derived from yours available at linux-stingr.bkbits.net/taskstate
2others: people says that it is nice patch, howewer it is completely untested. But I dunno what can be broken such way so ...
This is task->state cleanup. Big part seems to be eaten my Matti Aarnio so splitted goes below.
If you want to blame me for incorrect using of set instead of __set - feel free to mail me and point where I should to change. Or mail me a patch.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.320 -> 1.321
# drivers/usb/usb-uhci.h 1.4 -> 1.5
# drivers/video/sa1100fb.c 1.8 -> 1.9
# drivers/tc/zs.c 1.3 -> 1.4
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [email protected] 1.321
# task->state cleanup part 11
# finished drivers cleanup
# --------------------------------------------
#
diff -Nru a/drivers/tc/zs.c b/drivers/tc/zs.c
--- a/drivers/tc/zs.c Mon Apr 8 01:24:00 2002
+++ b/drivers/tc/zs.c Mon Apr 8 01:24:00 2002
@@ -1434,7 +1434,7 @@
info->tty = 0;
if (info->blocked_open) {
if (info->close_delay) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(info->close_delay);
}
wake_up_interruptible(&info->open_wait);
@@ -1469,14 +1469,14 @@
if (timeout)
char_time = MIN(char_time, timeout);
while ((read_zsreg(info->zs_channel, 1) & Tx_BUF_EMP) == 0) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(char_time);
if (signal_pending(current))
break;
if (timeout && time_after(jiffies, orig_jiffies + timeout))
break;
}
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
} /*
@@ -1614,7 +1614,7 @@
#endif
schedule();
}
- current->state = TASK_RUNNING;
+ set_current_state(TASK_RUNNING);
remove_wait_queue(&info->open_wait, &wait); if (!tty_hung_up_p(filp))
info->count++;
drivers/usb/usb-uhci.h +1 -1
@@ -11,7 +11,7 @@ {if (!in_interrupt ()) { - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout (1 + ms *HZ /1000 ); }else
drivers/video/sa1100fb.c +1 -1
@@ -1967,7 +1967,7 @@LCCR0 &= ~LCCR0_LEN ;/* Disable LCD Controller */ schedule_timeout (20 *HZ /1000 ); - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&fbi->ctrlr_wait, &wait); }
Signature · 2 lines
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar PPKJ1-RIPE // (smtp)[email protected] // (http)stingr.net // (pgp)0xA4B4ECA4