9.93 listthreads

struct thread_info {
    uint16_t thread_id;
    uint16_t niceness;
    uint16_t priority;
    uint16_t pid;
} __attribute__((packed));

size_t listthreads(struct thread_info *addr, size_t len);

This syscall writes a list of all threads currently in the system to addr, which contains len items.

The number of threads in the system is returned in success, and -1 in failure, with the following errno: