LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-11-2009, 02:22 AM   #1
aasa0001
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
userland: how to find the cpu currently running at


Hi everyone,

In a userland program (C), how to get the current cpu? e.g. Is there any API for it?
I do not want to use CPUID:1.

Excuse me if I didn't express it clear, as I am not native English speaker.
 
Old 02-11-2009, 04:14 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,144

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Perhaps you might like to look at containers. You can define a control group to only contain the CPUs you wish to be scheduled on (i.e avoid dispatch on any other(s)).
Not really what you asked, but it works fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU running at 100% usage while no applications are running mike_morley Linux - Desktop 14 05-17-2007 09:39 PM
CPU running above threshold!!! visris Linux - General 9 10-30-2006 02:48 AM
CPU running hot? stitchman Slackware 19 05-11-2006 03:17 PM
How to find CPU Cache ? (apart from dmesg|grep CPU) Dark Carnival Linux - Hardware 3 12-22-2005 07:10 PM
Seeing what processes are running and how much CPU they are using? DiZASTiX Linux - General 2 06-07-2003 03:05 PM


All times are GMT -5. The time now is 09:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration