I use one PicoScope 6402 with the 64bit libps6000.so library. I currently perform device configuration (ps6000MemorySegments, ps6000SetTrigger family, ps6000SetEts) in one thread and channel specific configuration (ps6000SetChannel, ps6000SetDataBuffer) in a second thread.
Is it safe if two threads both call a different ps6000 function?
What about if two threads both call the same ps6000 function, for example ps6000SetChannel or ps6000SetDataBuffer. Is the library thread safe?
If a function is sent to the driver while it is still executing a function,
then it will put the second function on hold until the first function has finished executing.
What happens if I use multiple PicoScope units in multiple threads? For example if call ps6000GetValues in two threads at the same time, one for each device. Would ps6000GetValues functions execute in parallel or would one wait for the other to finish?
There can be only one unit open in per process. To open multiple devices you would need one process per device - but then they would work seamlessly (assuming there is enough bandwidth on usb bus).
You could try dynamically loading another instance of libps6000.so to see if it works, ( should, but I haven't try that yet ).
The feature has been recognized some time ago and is in the current pipeline. However it has to be introduced in windows drivers first to allow porting to Linux version.