lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] de_thread: Use tsk not current.
On Mon, 10 Jul 2006 22:42:25 -0600
ebiederm@xmission.com (Eric W. Biederman) wrote:

>
> Ingo Oeser pointed out that because current expands to an inline function it
> is more space efficient and somewhat faster to simply keep a cached copy of
> current in another variable. This patch implements that for the de_thread
> function.
>
> - if (thread_group_empty(current))
> + if (thread_group_empty(tsk))
> - if (unlikely(current->group_leader == child_reaper))
> - child_reaper = current;
> + if (unlikely(tsk->group_leader == child_reaper))
> + child_reaper = tsk;
> - zap_other_threads(current);
> + zap_other_threads(tsk);
> read_unlock(&tasklist_lock);
> ...

This saves nearly 100 bytes of text on gcc-4.1.0/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/

\
 
 \ /
  Last update: 2006-07-11 12:19    [W:0.066 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site