002291千股千评:@@关于linux有名信号灯的问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/09 07:28:33
问题:我在redhat9下(linux-2.4.20内核)想用两个进程互斥访问一个在共享内存区的int值,使其不断加1。
编译通过了,可是运行时,sem_open()总是返回0(即(sem_t *)-1),系统提示错误是,Function not implemented!(函数没有被执行)。用下面的语句进行编译的:
gcc -o test test.c -lrt

难道是librt.so库的实现有问题么?

不大懂linux,
但是Function not implemented!(函数没有被执行)。
是函数没有被实现的意思啊