Suspend: PRINTK() cleanups
Hi!
This cleans PRINTK()s a bit, and schedule()s at the end of thaw, so processes are unstuck here. Please apply,
Pavel
usr/src/linux/kernel/suspend.c renamed from usr/src/tmp/linux/kernel/suspend.c +6 -5
@@ -149,15 +149,15 @@#define TEST_SWSUSP 1/* Set to 1 to reboot instead of halt machine after suspension */ #ifdef DEBUG_DEFAULT -# define PRINTK(f, a...) printk(f, ## a) +# define PRINTK(f, a...) do { printk(f, ## a); } while (0)#else -# define PRINTK(f, a...) +# define PRINTK(f, a...) do {} while (0)#endif #ifdef DEBUG_SLOW #define MDELAY (a) mdelay(a)#else -#define MDELAY (a) +#define MDELAY (a) do {} while (0)#endif /*
@@ -247,13 +247,15 @@ do_each_thread(g, p) {INTERESTING (p); -if (p->flags &PF_FROZEN ) p->flags &= ~PF_FROZEN ; +if (p->flags &PF_FROZEN ) + p->flags &= ~PF_FROZEN ;else printk (KERN_INFO " Strange, %s not stopped\n" , p->comm );wake_up_process (p); }while_each_thread (g, p);read_unlock (&tasklist_lock); +schedule ();printk (" done\n" );MDELAY (500 ); }
@@ -871,7 +873,6 @@* using normal kernel mechanism. */ do_magic (0 ); -PRINTK ("Restarting processes...\n" );thaw_processes (); } software_suspend_enabled =1 ;
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]