两个命令info threads查看所有的线程,其中带星号的为当前活动的线程thread (id) 切换到id线程进行调试编译时附件 -lpthread选项,对应的库是libpthread.-Wall显示编译的警告信息。