DCMD_PROC_FREEZETHREAD

Freeze a thread in the process that's associated with the file descriptor.

#include <sys/procfs.h>

#define DCMD_PROC_FREEZETHREAD  __DIOT(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 15, pthread_t)

The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process. You must have opened the file descriptor for writing.
dcmd DCMD_PROC_FREEZETHREAD
dev_data_ptr A pointer to a pthread_t
n_bytes sizeof(pthread_t)
dev_info_ptr NULL

The argument is a pointer to a pthread_t value that specifies the thread to be frozen. For example:

devctl( fd, DCMD_PROC_FREEZETHREAD, &tid, sizeof tid, NULL);

To unfreeze the thread, use DCMD_PROC_THAWTHREAD.