[lkml]   [2008]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: looking for a function

On Tue, 2008-09-16 at 14:50 +0200, Xu Yang wrote:
> 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.

That doesn't make much sense as the same thread can run on a different
CPU after each scheduling decision. And - as it is in userspace -
scheduling can happen before any assembler op.

Firmix Software GmbH
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services

 \ /
  Last update: 2008-09-16 16:03    [W:0.041 / U:5.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site