Selecting a thread for further operations

When you first perform the open() to a particular process, by default you're connected to the first thread (the thread that executed the main() function).

If you wish to switch a different thread, use the DCMD_PROC_CURTHREAD devctl() command, as described later in this chapter.

To find out how many threads are available in the given process, see the devctl() command DCMD_PROC_INFO, below.