Re: [PATCH][2.6] Completely out of line spinlocks / i386

From: Andreas Schwab
Date: Sun Aug 08 2004 - 07:34:25 EST


Zwane Mwaikambo <zwane@xxxxxxxxxxxxx> writes:

> Index: linux-2.6.8-rc3-mm1/arch/i386/lib/spinlock.c
> ===================================================================
> RCS file: linux-2.6.8-rc3-mm1/arch/i386/lib/spinlock.c
> diff -N linux-2.6.8-rc3-mm1/arch/i386/lib/spinlock.c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ linux-2.6.8-rc3-mm1/arch/i386/lib/spinlock.c 8 Aug 2004 05:39:13 -0000

Why not just make this an assembler source? It contains no real C code.
The only downside is that EXPORT_SYMBOL must be moved elsewhere, but on
the other hand it would make the assembler code more readable,

> +#define PROC(name) \
> + ".align 4\n" \
> + ".globl " #name"\n" \
> + #name":\n"

and you could use ENTRY from <linux/linkage.h>.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/