Switch to another thread.
#include <sys/procfs.h> #define DCMD_PROC_CURTHREAD __DIOT(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 8, pthread_t)
The arguments to devctl() are:
| Argument | Value |
|---|---|
| filedes | A file descriptor for the process. |
| dcmd | DCMD_PROC_CURTHREAD |
| dev_data_ptr | A pointer to a pthread_t |
| n_bytes | sizeof(pthread_t) |
| dev_info_ptr | NULL |
The argument to this command is a pthread_t value that specifies the thread that you want to be made the current thread. For example:
if ((err=devctl( fd, DCMD_PROC_CURTHREAD, &tid,
sizeof(tid), NULL)) != EOK) {
/* An error occurred. */
}