task->state cleanups part 6
Subsystems (2)
PATCH 1/1 task->state cleanups part 6
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.
# 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.315 -> 1.316
# drivers/md/lvm.c 1.16 -> 1.17
# drivers/isdn/isdn_tty.c 1.9 -> 1.10
# drivers/macintosh/mediabay.c 1.3 -> 1.4
# drivers/md/md.c 1.29 -> 1.30
# drivers/macintosh/via-pmu.c 1.9 -> 1.10
# drivers/macintosh/macserial.c 1.7 -> 1.8
# drivers/isdn/hisax/sedlbauer.c 1.5 -> 1.6
# drivers/macintosh/adb.c 1.5 -> 1.6
# drivers/isdn/icn/icn.c 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [email protected] 1.316
# task->state cleanup part 6
# --------------------------------------------
#
drivers/isdn/hisax/sedlbauer.c +3 -3
@@ -448,10 +448,10 @@byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_on);save_flags (flags);sti (); - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout ((20 *HZ )/1000 );byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_off); - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout ((20 *HZ )/1000 );restore_flags (flags); }else {
@@ -621,7 +621,7 @@byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_on);save_flags (flags);sti (); - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout ((10 *HZ )/1000 );byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_off);restore_flags (flags);
drivers/isdn/icn/icn.c +4 -4
@@ -772,7 +772,7 @@#ifdef BOOT_DEBUG printk (KERN_DEBUG "Loader %d TO?\n" , cardnumber);#endif - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (ICN_BOOT_TIMEOUT1 ); }else {#ifdef BOOT_DEBUG
@@ -798,7 +798,7 @@int slsec = sec; \printk (KERN_DEBUG "SLEEP(%d)\n" ,slsec); \while (slsec) { \ - current->state =TASK_INTERRUPTIBLE ; \ +set_current_state (TASK_INTERRUPTIBLE ); \schedule_timeout (HZ ); \ slsec--; \ } \
@@ -957,7 +957,7 @@icn_maprelease_channel (card,0 );return -EIO ; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (10 ); } }
@@ -981,7 +981,7 @@#ifdef BOOT_DEBUG printk (KERN_DEBUG "Proto TO?\n" );#endif - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (ICN_BOOT_TIMEOUT1 ); }else {if ((card->secondhalf) || (!card->doubleS0)) {
drivers/isdn/isdn_tty.c +1 -1
@@ -1712,7 +1712,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/macintosh/adb.c +3 -3
@@ -120,7 +120,7 @@ {if (current->pid && adb_probe_task_pid && adb_probe_task_pid == current->pid) { - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout (1 + ms *HZ /1000 ); }else mdelay (ms);
@@ -701,7 +701,7 @@ req =NULL ;spin_lock_irqsave (&state->lock, flags);add_wait_queue (&state->wait_queue, &wait); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );for (;;) { req = state->completed;
@@ -725,7 +725,7 @@spin_lock_irqsave (&state->lock, flags); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&state->wait_queue, &wait);spin_unlock_irqrestore (&state->lock, flags);
drivers/macintosh/macserial.c +4 -4
@@ -2037,7 +2037,7 @@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);
@@ -2085,14 +2085,14 @@if (timeout) char_time =MIN (char_time, timeout);while ((read_zsreg (info->zs_channel,1 ) &ALL_SNT ) ==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 ); }/*
@@ -2227,7 +2227,7 @@ info->line, info->count);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/macintosh/mediabay.c +1 -1
@@ -630,7 +630,7 @@for (i =0 ; i < media_bay_count; ++i)media_bay_step (i); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 );if (signal_pending (current))return 0 ;
drivers/macintosh/via-pmu.c +2 -2
@@ -2296,7 +2296,7 @@spin_lock_irqsave (&pp->lock, flags);add_wait_queue (&pp->wait, &wait); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );for (;;) { ret = -EAGAIN ;
@@ -2325,7 +2325,7 @@schedule ();spin_lock_irqsave (&pp->lock, flags); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&pp->wait, &wait);spin_unlock_irqrestore (&pp->lock, flags);
drivers/md/lvm.c +2 -2
@@ -1788,7 +1788,7 @@if (vg_ptr->lv[i] !=NULL && vg_ptr->lv[i]->lv_access &LV_SNAPSHOT ) {lvm_do_lv_remove (minor,NULL , i); - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout (1 ); } }
@@ -1796,7 +1796,7 @@for (i =0 ; i < vg_ptr->lv_max; i++) {if (vg_ptr->lv[i] !=NULL ) {lvm_do_lv_remove (minor,NULL , i); - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout (1 ); } }
drivers/md/md.c +3 -3
@@ -2946,13 +2946,13 @@DECLARE_WAITQUEUE (wait, current);add_wait_queue (&thread->wqueue, &wait); -set_task_state (current,TASK_INTERRUPTIBLE ); +set_current_state (TASK_INTERRUPTIBLE );if (!test_bit (THREAD_WAKEUP , &thread->flags)) {dprintk ("md: thread %p went to sleep.\n" , thread);schedule ();dprintk ("md: thread %p woke up.\n" , thread); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&thread->wqueue, &wait);clear_bit (THREAD_WAKEUP , &thread->flags);
@@ -3473,7 +3473,7 @@if ((currspeed > sysctl_speed_limit_max) || !is_mddev_idle (mddev)) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );md_schedule_timeout (HZ /4 ); goto repeat; }
Signature · 2 lines
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar PPKJ1-RIPE // (smtp)[email protected] // (http)stingr.net // (pgp)0xA4B4ECA4