lkml.org 
[lkml]   [2001]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: kernel/sched.c questions
From
Date
Tim Walberg <tewalberg@mediaone.net> writes:

> On 04/04/2001 16:52 -0300, Sardañons, Eliel wrote:
> >> Hello, I would like to know why you put this two functions:
> >> void scheduling_functions_start_here(void) { }
> >> ...
> >> void scheduling_functions_end_here(void) { }
> >>
>
> That one I have no idea about - maybe some perverse sort
> of comment? Or maybe something somewhere needs to know the
> address range that some functions lie within, and these functions
> would delimit that range. Of course, that presumes that the
> compiler in use doesn't reorder functions in the object code
> that emits, but I think that's a fairly safe assumption for
> now...

This is needed for a very bad hack to get the EIP information in ps -lax:
most programs would be shown as hanging in schedule(), which would not be
very useful to show the user. To avoid this sched.c is always compiled with
frame pointers and if the EIP is inside these two functions the proc code
goes back one level in the stack frame.


-Andi
-
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: 2005-03-22 13:23    [W:0.098 / U:1.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site