task->state cleanups part 3
Subsystems (2)
PATCH 1/1 task->state cleanups part 3
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.312 -> 1.313
# drivers/char/ftape/zftape/zftape-buffers.c 1.2 -> 1.3
# drivers/char/epca.c 1.7 -> 1.8
# drivers/char/dz.c 1.8 -> 1.9
# drivers/char/amd768_rng.c 1.1 -> 1.2
# drivers/char/mk712.c 1.1 -> 1.2
# drivers/char/cyclades.c 1.7 -> 1.8
# drivers/char/ftape/lowlevel/fdc-io.c 1.1 -> 1.2
# drivers/char/busmouse.c 1.3 -> 1.4
# drivers/char/lcd.c 1.1 -> 1.2
# drivers/char/joystick/serport.c 1.3 -> 1.4
# drivers/char/dtlk.c 1.4 -> 1.5
# drivers/char/i810_rng.c 1.8 -> 1.9
# drivers/char/ip2/i2lib.c 1.4 -> 1.5
# drivers/char/ip2main.c 1.7 -> 1.8
# drivers/char/amiserial.c 1.6 -> 1.7
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/04/08 [email protected] 1.313
# task->state cleanup part 3
# --------------------------------------------
#
drivers/char/amd768_rng.c +1 -1
@@ -153,7 +153,7 @@if (current->need_resched) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 ); }else
drivers/char/amiserial.c +4 -4
@@ -1615,7 +1615,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);
@@ -1676,14 +1676,14 @@#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk ("serdatr = %d (jiff=%lu)..." , lsr, jiffies);#endif - 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 );#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk ("lsr = %d (jiff=%lu)...done\n" , lsr, jiffies);#endif
@@ -1837,7 +1837,7 @@#endif schedule (); } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&info->open_wait, &wait);if (extra_count) state->count++;
drivers/char/busmouse.c +1 -1
@@ -266,7 +266,7 @@ goto repeat; } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&mse->wait, &wait);if (signal_pending (current)) {
drivers/char/cyclades.c +7 -7
@@ -2507,7 +2507,7 @@ firm_id = (struct FIRM_ID *) (base_addr +ID_ADDRESS );if (!ISZLOADED (*cinfo)){ - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&info->open_wait, &wait);return -EINVAL ; }
@@ -2558,7 +2558,7 @@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++;
@@ -2774,21 +2774,21 @@#ifdef CY_DEBUG_WAIT_UNTIL_SENT printk ("Not clean (jiff=%lu)..." , jiffies);#endif - 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 ); }else {// Nothing to do! }/* Run one more char cycle */ - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (char_time *5 ); - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );#ifdef CY_DEBUG_WAIT_UNTIL_SENT printk ("Clean (jiff=%lu)...done\n" , jiffies);#endif
@@ -2928,7 +2928,7 @@if (info->blocked_open) {CY_UNLOCK (info, flags);if (info->close_delay) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (info->close_delay); }wake_up_interruptible (&info->open_wait);
drivers/char/dtlk.c +2 -2
@@ -365,7 +365,7 @@ static void __exit dtlk_cleanup (void) {dtlk_write_bytes ("goodbye" ,8 ); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (5 *HZ /10 );/* nap 0.50 sec but could be awakened earlier by
@@ -385,7 +385,7 @@/* sleep for ms milliseconds */ static void dtlk_delay (int ms) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout ((ms *HZ +1000 -HZ ) /1000 ); }
drivers/char/dz.c +3 -3
@@ -942,7 +942,7 @@ tmp =dz_in (info,DZ_TCR ); tmp |= mask; - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );save_flags (flags);cli ();
@@ -1122,7 +1122,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);
@@ -1235,7 +1235,7 @@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/char/epca.c +2 -2
@@ -598,7 +598,7 @@if (ch->close_delay) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (ch->close_delay); }
@@ -1349,7 +1349,7 @@ }/* End forever while */ - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&ch->open_wait, &wait);cli ();if (!tty_hung_up_p (filp))
drivers/char/ftape/lowlevel/fdc-io.c +2 -2
@@ -410,7 +410,7 @@recalc_sigpending (current);spin_unlock_irq (¤t->sigmask_lock); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );add_wait_queue (&ftape_wait_intr, &wait);while (!ft_interrupt_seen && (current->state ==TASK_INTERRUPTIBLE )) { timeout =schedule_timeout (timeout);
@@ -433,7 +433,7 @@* kernel mode. Sending a pair of SIGSTOP/SIGCONT to the * tasks wakes it up again. Funny! :-) */ - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );if (ft_interrupt_seen) {/* woken up by interrupt */ ft_interrupt_seen =0 ; TRACE_EXIT 0;
drivers/char/ftape/zftape/zftape-buffers.c +1 -1
@@ -122,7 +122,7 @@void *new;while ((new =kmalloc (size,GFP_KERNEL )) ==NULL ) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (HZ /10 ); }memset (new,0 , size);
drivers/char/i810_rng.c +1 -1
@@ -243,7 +243,7 @@if (filp->f_flags &O_NONBLOCK )return ret ? : -EAGAIN ; - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 );if (signal_pending (current))
drivers/char/ip2/i2lib.c +2 -2
@@ -659,7 +659,7 @@ timeout--;// So negative values == forever if (!in_interrupt ()) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (1 );// short nap }else {// we cannot sched/sleep in interrrupt silly
@@ -1136,7 +1136,7 @@ip2trace (CHANN ,ITRC_OUTPUT ,61 ,0 ); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (2 );if (signal_pending (current)) {break ;
drivers/char/ip2main.c +1 -1
@@ -1863,7 +1863,7 @@if (pCh->wopen) {if (pCh->ClosingDelay) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (pCh->ClosingDelay); }wake_up_interruptible (&pCh->open_wait);
drivers/char/joystick/serport.c +2 -2
@@ -159,11 +159,11 @@printk (KERN_INFO "serio%d: Serial port %s\n" , serport->serio.number, name);add_wait_queue (&serport->wait, &wait); - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );while (serport->serio.type && !signal_pending (current))schedule (); - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&serport->wait, &wait);serio_unregister_port (&serport->serio);
drivers/char/lcd.c +1 -1
@@ -535,7 +535,7 @@ lcd_waiters++;while (((buttons_now = (long )button_pressed ()) ==0 ) && !(signal_pending (current))) { - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (2 *HZ ); } lcd_waiters--;
drivers/char/mk712.c +1 -1
@@ -383,7 +383,7 @@schedule (); goto repeat; } - current->state =TASK_RUNNING ; +set_current_state (TASK_RUNNING );remove_wait_queue (&queue->proc_list, &wait); }
Signature · 2 lines
Paul P 'Stingray' Komkoff 'Greatest' Jr // (icq)23200764 // (irc)Spacebar PPKJ1-RIPE // (smtp)[email protected] // (http)stingr.net // (pgp)0xA4B4ECA4