Re: [patch] i386: use C code for current_thread_info()

From: Albert Cahalan
Date: Tue Jun 13 2006 - 01:25:18 EST


Chuck Ebbert writes:

Using C code for current_thread_info() lets the compiler optimize it.
With gcc 4.0.2, kernel is smaller:

The often-forgotten __attribute__((const)) might do the job.
The function is indeed const as far as gcc can see, except
perhaps near the schedular code that switches stacks.

This applies to many similar functions, like the ones used
to get current. It should work for the C code too.
-
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/