f179ce12b7
Correct `sched_setaffinity()` to use the thread IDs (TIDs) instead of process IDs (PIDs). The previous implementation used PIDs, which caused issues since affinity settings need to be applied at the thread level. As the manual documented, the signature is: > int sched_setaffinity(pid_t pid, size_t cpusetsize, > const cpu_set_t *mask); Yes, it's tricky, the identification passing in is called **'PID'**. But when we talk about 'pid' from GNU libc, it's the **'task-id'**, aka, `thread->tid` known in kernel. Changes were made by updating the function signatures and logic in `lwp.h`, `lwp_pid.c`, and `lwp_syscall.c` to accept TIDs. Specifically, the `lwp_setaffinity` function and related internal functions now operate using thread IDs and adjust thread affinity settings accordingly Signed-off-by: Shell <smokewood@qq.com>