From owner-freebsd-hackers@FreeBSD.ORG Thu May 5 21:11:08 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4134616A4CE for ; Thu, 5 May 2005 21:11:08 +0000 (GMT) Received: from biltens.etika.net (mail.etikaweb.net [65.75.141.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FD9543D7C for ; Thu, 5 May 2005 21:11:08 +0000 (GMT) (envelope-from halil@enderunix.org) Received: from [81.213.121.187] (helo=[192.168.7.100]) by biltens.etika.net with esmtp (Exim 4.44) id 1DTncZ-0001Ax-HC for freebsd-hackers@freebsd.org; Fri, 06 May 2005 00:11:05 +0300 From: Halil Demirezen Organization: Enderunix To: freebsd-hackers@freebsd.org Date: Fri, 6 May 2005 00:10:25 +0000 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505060010.26184.halil@enderunix.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - biltens.etika.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - enderunix.org X-Source: X-Source-Args: X-Source-Dir: Subject: A bit confused with the sched_4bsd.c code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 21:11:08 -0000 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... Thanks.