摘要:
学东西,往往实例才是最让人感兴趣的,老是学基础理论,不动手,感觉没有成就感,呵呵。 下面先来一个实例。我们通过创建两个线程来实现对一个数的递加。或许这个实例没有实际运用的价值,但是稍微改动一下,我们就可以用到其他地方去拉。下面是我们的代码:/*thread_example.c : c multiple thread programming in linux *author : falcon *E-mail : tunzhj03@st.lzu.edu.cn */#include <pthread.h>#include <stdio.h>#include <sys/t 阅读全文
posted @ 2010-05-28 19:22
arm-linux
阅读(41179)
评论(0)
推荐(2)

浙公网安备 33010602011771号