Finding the phidget driver thread

Supporting Java SE version 7 and up
Soroush
Phidgetsian
Posts: 8
Joined: Sat Nov 16, 2013 8:35 am
Contact:

Finding the phidget driver thread

Postby Soroush » Wed Dec 10, 2014 1:41 pm

I'd like to find the phidget driver thread to assign it the desired affinity. If I'm doing it in java is it the same as the EventListener thread? So if I get the thread by adding the following code to an attachListener:

Code: Select all

Thread.currentThread().getId();//To get the thread id
AffinityLock.acquireLock(); // to lock the thread to the desired core!

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Finding the phidget driver thread

Postby Patrick » Wed Dec 10, 2014 2:08 pm

The attach event thread is probably not the thread you want - this thread simply polls for new USB devices and attaches/detaches them from user opened devices.

The data events are called directly from the thread which issues USB reads - this is probably the thread you're looking for.

-Patrick

Soroush
Phidgetsian
Posts: 8
Joined: Sat Nov 16, 2013 8:35 am
Contact:

Re: Finding the phidget driver thread

Postby Soroush » Wed Dec 10, 2014 2:44 pm

The data events are called directly from the thread which issues USB reads


So may you let me know how I can find this thread?(either using 'ps -eLf | grep threadName' or programmatically in C)

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Finding the phidget driver thread

Postby Patrick » Wed Dec 10, 2014 3:40 pm

register a data event handler and grab it from the first event callback.


Return to “Java”

Who is online

Users browsing this forum: No registered users and 1 guest