The strace command with the -p option followed by a process ID (进程号) is used to attach to a running process and trace its system calls and signals.

In this specific output line, sched_yield() is a system call that causes the calling thread to relinquish the CPU and allow other threads to be scheduled. The return value of 0 indicates that the system call was successful.

strace -p 进程号输出sched_yield = 0

原文地址: http://www.cveoy.top/t/topic/iXBj 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录