lkml.org 
[lkml]   [2006]   [Jun]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 13 Jun 2006 01:26:29 -0400
From"Albert Cahalan" <>
SubjectRe: [patch] i386: use C code for current_thread_info()
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-13 05:28    [from the cache]
©2003-2008