主题 : linux2.6.29带POSIX函数库吗? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 5012
精华: 0
发帖: 6
金钱: 60 两
威望: 55 点
综合积分: 12 分
注册时间: 2009-04-07
最后登录: 2009-09-23
楼主  发表于: 2009-05-25 21:47

 linux2.6.29带POSIX函数库吗?

前段时间买来mini2440, 今天看了看光盘上的linux2.6.29, 发现好像没有POSIX库, 是这样吗?

我该怎么加posix库? 谢谢!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-05-25 22:28
你说的POSIX库是什么?内核中所谓的"库"都是内核自己用的,包括一个微型的libc,用以实现一些常用的c库函数,比如memcpy, strcmp
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 5012
精华: 0
发帖: 6
金钱: 60 两
威望: 55 点
综合积分: 12 分
注册时间: 2009-04-07
最后登录: 2009-09-23
2楼  发表于: 2009-05-26 10:05
回楼上,我指的是函数 pthread_create 所在的这些文件,一般有
pthreadLib.c
pthread.h
posixScLib.c
等一些文件

没有这些文件我就不能thread编程啊。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-05-26 11:16
内核是不带有POSIX Thread库的,那是文件系统中的C库的一部分,如果要在内核中用线程,可以用kernel thread(kthread)实现
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."