Hi again, A followup on pbind...
I have a question regarding binding a thread to a processor. I'm using the function processor_bind within an application, but I'm unsure which parameters I should use. This is my current approach int result = processor_bind(P_LWPID, P_MYID, processor_id, NULL); However, I don't think P_MYID will return the thread_id, right? I could use pthread_self() just after I created a thred - it returns pthread_t (which is also an integer as well as id_t, the second parameter type of processor_bind). Is that a possible (and correct) way to bind a thread to a processor? Secondly, the application takes the number of threads, N, as a parameter, but spawns only N-1 threads because the main process does part of the work. I'm unsure how to acquire a correct thread id of the main processs to bind it to a processor. Do you have any idea on how to do this? I don't think using pthread_self before creating the other threads would do the trick.... Regards, Mladen This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
