http://home.gna.org/gdsl/1.8/html/examples_2main_queue_8c-example.html 这个是linux上的代码使用片段,可以一直在其它设备上使用,比如移植在stm32的开发上。