Scheduler ugliness-fix

Pavel Machek (pavel@bug.ucw.cz)
Wed, 8 Jul 1998 15:25:42 +0200


Hi!

This is bugfix. (Or more uggliness-fix. No need to try to fool gcc
when jiffies are volatile, anyway, also (~0UL == 0xffffffff) tests
fail when cross compiling and we already have clean way to do this.

Pavel

--- clean/kernel/sched.c Thu Jun 25 17:38:15 1998
+++ linux/kernel/sched.c Wed Jul 8 15:13:56 1998
@@ -1100,12 +1108,12 @@
void do_timer(struct pt_regs * regs)
{
- (*(unsigned long *)&jiffies)++;
+ jiffies++; /* As jiffies are defined volatile, no need to fool gcc */
lost_ticks++;
mark_bh(TIMER_BH);
if (!user_mode(regs))
lost_ticks_system++;
if (tq_timer)
mark_bh(TQUEUE_BH);
}

#ifndef __alpha__
@@ -1532,7 +1543,7 @@
printk(stat_nam[p->state]);
else
printk(" ");
-#if ((~0UL) == 0xffffffff)
+#if (BITS_PER_LONG == 32)
if (p == current)
printk(" current ");
else
@@ -1595,7 +1606,7 @@
{
struct task_struct *p;

-#if ((~0UL) == 0xffffffff)
+#if (BITS_PER_LONG == 32)
printk("\n"
" free sibling\n");
printk(" task PC stack pid father child younger older\n");

-- 
I'm really pavel@atrey.karlin.mff.cuni.cz. 	   Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu