Hi,

On 11/06/2009 09:30 AM, narendra babu wrote:
Hello Friends ,

I ahve a Solaris code with processor_bind system call to bind LWPs to a 
processor


The processor_bind() function binds the LWP (lightweight process) or set of 
LWPs specified by idtype and id to the processor specified by processorid. If 
obind is not NULL, this function also sets the processorid_t variable pointed 
to by obind to the previous binding of one of the specified LWPs, or to 
PBIND_NONE if the selected LWP was not bound.

I have checked the manuals and documents , but  i found there is no equivalent 
sys call in linux

The Linux system calls that are processor affinity based are 
sched_setaffinity(2) and sched_getaffinity(2).

I would like to know is there any wrapper fun or workaround for processor_bind 
in Linux


I am not quite sure if this is what you are looking for, but take a look at pthread_setaffinity_np(3). This sets the affinity of a thread (as opposed to the entire process), which is what a LWP would be called on linux, to a specific CPU.

cheers,
- steve
--
random non tech spiel: http://lonetwin.blogspot.com/
tech randomness: http://lonehacks.blogspot.com/
what i'm stumbling into: http://lonetwin.stumbleupon.com/
_______________________________________________
To unsubscribe, email [email protected] with "unsubscribe <password> <address>" in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to