task->state cleanups part 2
Subsystems (4)
PATCH 1/1 task->state cleanups part 2
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. Starting from part 2.
# 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.311 -> 1.312
# drivers/block/swim_iop.c 1.2 -> 1.3
# drivers/cdrom/mcd.c 1.7 -> 1.8
# drivers/atm/atmtcp.c 1.2 -> 1.3
# drivers/block/ll_rw_blk.c 1.31 -> 1.32
# drivers/block/paride/pf.c 1.7 -> 1.8
# drivers/atm/firestream.c 1.10 -> 1.11
# drivers/cdrom/cdu31a.c 1.5 -> 1.6
# drivers/cdrom/sbpcd.c 1.9 -> 1.10
# drivers/acorn/char/mouse_ps2.c 1.3 -> 1.4
# drivers/block/paride/pt.c 1.6 -> 1.7 # drivers/block/paride/pg.c 1.5 -> 1.6 # drivers/cdrom/sonycd535.c 1.4 -> 1.5
# drivers/block/swim3.c 1.4 -> 1.5
# drivers/acpi/os.c 1.8 -> 1.9
# drivers/block/paride/pcd.c 1.6 -> 1.7
# drivers/bluetooth/hci_vhci.c 1.4 -> 1.5
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [email protected] 1.312
# task->state cleanup part 2
# --------------------------------------------
#
drivers/acorn/char/mouse_ps2.c +2 -2
@@ -191,12 +191,12 @@return -EAGAIN ;add_wait_queue (&queue->proc_list, &wait); repeat: - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );if (queue_empty () && !signal_pending (current)) {schedule (); goto repeat; } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&queue->proc_list, &wait); }while (i >0 && !queue_empty ()) {
drivers/acpi/os.c +2 -2
@@ -261,7 +261,7 @@void acpi_os_sleep (u32 sec,u32 ms) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (HZ * sec + (ms *HZ ) /1000 ); }
@@ -796,7 +796,7 @@ ret =down_trylock (sem);for (i = timeout; (i >0 && ret <0 ); i -= quantum_ms) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); ret =down_trylock (sem); }
drivers/atm/atmtcp.c +1 -1
@@ -77,7 +77,7 @@set_current_state (TASK_UNINTERRUPTIBLE );schedule (); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&vcc->sleep,&wait);return error; }
drivers/atm/firestream.c +1 -1
@@ -1719,7 +1719,7 @@ }/* Try again after 10ms. */ - current->state =TASK_UNINTERRUPTIBLE ; +set_current_state (TASK_UNINTERRUPTIBLE );schedule_timeout ((HZ +99 )/100 ); }
drivers/block/ll_rw_blk.c +1 -1
@@ -541,7 +541,7 @@spin_unlock_irq (&io_request_lock); }while (rq ==NULL );remove_wait_queue (&q->wait_for_requests[rw], &wait); - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );return rq; }
drivers/block/paride/pcd.c +1 -1
@@ -588,7 +588,7 @@static void pcd_sleep (int cs ) -{ current->state =TASK_INTERRUPTIBLE ; +{set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (cs); }
drivers/block/paride/pf.c +1 -1
@@ -676,7 +676,7 @@static void pf_sleep (int cs ) -{ current->state =TASK_INTERRUPTIBLE ; +{set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (cs); }
drivers/block/paride/pg.c +1 -1
@@ -356,7 +356,7 @@static void pg_sleep (int cs ) -{ current->state =TASK_INTERRUPTIBLE ; +{set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (cs); }
drivers/block/paride/pt.c +1 -1
@@ -468,7 +468,7 @@static void pt_sleep (int cs ) -{ current->state =TASK_INTERRUPTIBLE ; +{set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (cs); }
drivers/block/swim3.c +3 -3
@@ -803,7 +803,7 @@ err = -EINTR ;break ; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); } fs->ejected =1 ;
@@ -890,7 +890,7 @@ err = -EINTR ;break ; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); } if (err == 0 && (swim3_readbit(fs, SEEK_COMPLETE) == 0
@@ -988,7 +988,7 @@break ;if (signal_pending (current))break ; - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); } ret =swim3_readbit (fs,SEEK_COMPLETE ) ==0
drivers/block/swim_iop.c +1 -1
@@ -327,7 +327,7 @@ err = -EINTR ;break ; } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); }release_drive (fs);
drivers/bluetooth/hci_vhci.c +2 -2
@@ -188,7 +188,7 @@add_wait_queue (&hci_vhci->read_wait, &wait);while (count) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );/* Read frames from device queue */ if (!(skb =skb_dequeue (&hci_vhci->readq))) {
@@ -215,7 +215,7 @@break ; } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&hci_vhci->read_wait, &wait);return ret;
drivers/cdrom/cdu31a.c +3 -3
@@ -394,7 +394,7 @@unsigned long flags;if (cdu31a_irq <=0 ) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (0 ); }else {/* Interrupt driven */
@@ -737,7 +737,7 @@ res_reg[1]); } - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (2 *HZ );sony_get_toc ();
@@ -968,7 +968,7 @@if (((result_buffer[0 ] &0xf0 ) ==0x20 ) && (num_retries <MAX_CDU31A_RETRIES )) { num_retries++; - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (HZ /10 );/* Wait .1 seconds on retries */ goto retry_cd_operation; }
drivers/cdrom/mcd.c +1 -1
@@ -996,7 +996,7 @@if (st ==-1 ) goto err_out;/* drive doesn't respond */ if ((st &MST_READY ) ==0 ) {/* no disk? wait a sec... */ - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (HZ ); } }while (((st &MST_READY ) ==0 ) && count++ <MCD_RETRY_ATTEMPTS );
drivers/cdrom/sbpcd.c +1 -1
@@ -878,7 +878,7 @@static void sbp_sleep (u_int time) {sti (); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (time);sti (); }
drivers/cdrom/sonycd535.c +3 -3
@@ -339,7 +339,7 @@sony_sleep (void) {if (sony535_irq_used <=0 ) {/* poll */ - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (0 ); }else {/* Interrupt driven */ cli ();
@@ -894,7 +894,7 @@ }if (readStatus ==BAD_STATUS ) {/* Sleep for a while, then retry */ - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (RETRY_FOR_BAD_STATUS *HZ /10 ); }#if DEBUG >0
@@ -1515,7 +1515,7 @@/* look for the CD-ROM, follows the procedure in the DOS driver */ inb (select_unit_reg);/* wait for 40 18 Hz ticks (reverse-engineered from DOS driver) */ - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout ((HZ +17 )*40 /18 );inb (result_reg);
Signature · 2 lines
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar PPKJ1-RIPE // (smtp)[email protected] // (http)stingr.net // (pgp)0xA4B4ECA4