Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 May 2005 16:33:13 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Halil Demirezen <halil@enderunix.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: A bit confused with the sched_4bsd.c code
Message-ID:  <427AAD39.1000304@elischer.org>
In-Reply-To: <200505060010.26184.halil@enderunix.org>
References:  <200505060010.26184.halil@enderunix.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Halil Demirezen wrote:

>Hello,
>
>First of all, I am not sure if this is the correct mail list with posting this 
>mail. I apologize for that.. Second, I may seem to have little 
>C knowledge, though I am using C for about 5 years and plus.
>
>Let's start with the question. I am digging the FreeBSD-5.3 kernel codes.
>Watson's Cross Reference is really helpful. In the schedcpu(void) function
>there is an assignment like "ke = td->td_kse;" on line 438  (see: 
>http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438").
>When I look at the thread structure at sys/proc.h, I could not see such an
>entry td_kse in the "thread" structure. How has this structure been extended 
>or this entry added to the thread structure?
>
>Although the kernel codes seem to be simply understandable, there still lies
>some difficulties to understand for an average C programmer: magic stuff done
>by professionals. :)
>
>Anyway, any help really will be appreciated...
>  
>

originally there were 2 structures

the kse
and the td_sched

They were merged but the code was kept teh same so that edits would be 
not 'flooded'  in
the diffs.
places that used to refer to ke->ke_xxx still do and places that used to 
refer to td->td_sched->tds_xxx still do
but they are now the same thing.


>Thanks.
>_______________________________________________
>freebsd-hackers@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>  
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?427AAD39.1000304>