From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 21 21:54:54 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4B6F5DA for ; Sat, 21 Mar 2015 21:54:54 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94B14FB5 for ; Sat, 21 Mar 2015 21:54:54 +0000 (UTC) Received: by pdbop1 with SMTP id op1so144311934pdb.2 for ; Sat, 21 Mar 2015 14:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=hj6L9rc5nrrr2rEfRmbJ5CugyHlNNMULJTkmxJbVS2k=; b=rRa6sfVIV/yR0q/lXslSjVqvAcW1t6DDAhAALs1NDVNCKXbzMunYMRWgcwT3SysVmG FYNG0YG1uQQ75qtpbOQTPzp3iDizI0g3eZfm1URwTXzzugIa0bAllHJHXG5bLoZDC84y WBt/jAwjg+JjfQtlQ+Wk7skuYxMeTFvry3qtxtgLSJ0ZEMDiJmxxD/1sYgfxgRXZd/qZ nGSgagJsOjLhcoPlSnbGTrjVxD9Vj0EBhEHPPL8hx6eC/bRe9P+BMVDDzTJQWkkrMz3N cMnjkRF+CKLUKY6gfAhjcjHoo8EHlrr/3EFenAXe3V0hhPaGBvteWO/n56FXZHbWYJ0v tIWA== X-Received: by 10.68.131.36 with SMTP id oj4mr7664555pbb.121.1426974894280; Sat, 21 Mar 2015 14:54:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.179.203 with HTTP; Sat, 21 Mar 2015 14:54:24 -0700 (PDT) From: Yue Chen Date: Sat, 21 Mar 2015 17:54:24 -0400 Message-ID: Subject: How to traverse kernel threads? To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2015 21:54:54 -0000 Dear all, Is there an easy way to traverse all the kernel threads (including modules') in a FreeBSD kernel module? The resulting structure would be `` struct thread * ''. Best regards and thanks,