Messages in this thread Patch in this message | | | Date | Wed, 9 Jul 2003 00:33:40 +0200 | From | Pavel Machek <> | Subject | 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/tmp/linux/kernel/suspend.c 2003-07-09 00:21:15.000000000 +0200 +++ /usr/src/linux/kernel/suspend.c 2003-07-08 14:11:28.000000000 +0200 @@ -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; -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |