From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754209AbYIPMuu (ORCPT ); Tue, 16 Sep 2008 08:50:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752418AbYIPMum (ORCPT ); Tue, 16 Sep 2008 08:50:42 -0400 Received: from rn-out-0910.google.com ([64.233.170.188]:42948 "EHLO rn-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbYIPMul (ORCPT ); Tue, 16 Sep 2008 08:50:41 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=M3o8/bbWp2ZBtl8SZuTorR5PrROhR7oVuNoOKUrsxdEo6SGqQWmp3lGS5qqJ/Fp2jS /IrfMNarFeWpOpD2Vn5kVrQphiXFabXXM1eeE295/fWGXaaKnqrpIJhA0izwKYdqpVkq GaNLqoVR4MZ/w5p2Odm0h9X3YBJb22NjT9VU8= Message-ID: Date: Tue, 16 Sep 2008 14:50:38 +0200 From: "Xu Yang" To: linux-kernel@vger.kernel.org Subject: looking for a function MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi guys, I am looking for a function that can show me the current thread is running on which cpu. e.g I am using pthread to write a multithreaded program, in each thread I would like to insert such kind of function so that I can know on which cpu this thread is running on. which function should be used? thanks for the help!! best regards, Yang