Re: [PATCH] 2.5.1-pre5: per-cpu areas

From: J.A. Magallon (jamagallon@able.es)
Date: Mon Mar 18 2002 - 19:08:09 EST


On 2002.03.19 Rusty Russell wrote:
>
>> > static struct myinfo mystuff __per_cpu_data;
>> >
>> > Now how do we set mystuff.x on this CPU?
>>
>> set_this_cpu(mystuff.x, y) could be eventually supported properly, it just
>> needs compiler work (and before that can use address calculation & reference)
>
>I think the effort would be better spent on teaching the compiler
>about these special variables, and how to do efficient assignments on
>them.
>

Not sure if suitable, but Microsoft C has a __declspec(thread) builtin
in the compiler. That beast would be fine also in gcc, something like

int self __attribute__ ((thread));

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.2 (Bluebird) for i586
Linux werewolf 2.4.19-pre3-jam3 #1 SMP Fri Mar 15 01:16:08 CET 2002 i686
-
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/



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:17 EST