required.
> +#ifdef CONFIG_M386
lock incl is available on 386's, too. (you need incl only as there are no SMP 386).
> unsigned long flags;
>
> spin_lock_irqsave(&semaphore_wake_lock, flags);
> sem->waking++;
> spin_unlock_irqrestore(&semaphore_wake_lock, flags);
> +#else
> + __asm__ __volatile__(
> +#ifdef __SMP__
> + "lock ; "
> +#endif
> + "incl %1"
> + : "=m" (sem->waking) : "0" (sem->waking));
> +#endif
> }
> +#if CONFIG_386
cmpxchg is new to the Pentium ...
> + __asm__ __volatile__(
> + "movl %2,%%eax\n"
> + "1:\tmovl %%eax,%1\n\t"
> + "decl %1\n\t"
> + "jmi 2f\n\t"
That is "js" on Intel normally.
Philipp Rumpf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/