Redian新闻
>
哪个方向相对最赚钱???
avatar
哪个方向相对最赚钱???# Business - 商学院
l*v
1
今天去洗牙, 华人医生说有一个智齿坏了,要拔,
相应地下面那颗也要拔
另一边的两颗, 没问题,也要拔掉, 我答应了。
看了精华区, 有点害怕了。
后悔不注意口腔卫生,自己的牙齿白亮,从来没毛病
经常不刷牙,结果智齿坏了。
avatar
h*7
2
请问《当代汉语词典》(国际华语版)与《现代汉语词典》(第5版)相比,哪一种更好?
谢谢。
avatar
h*i
3
今天的我,
是那时的你。
你我在感情的时差中,
错过...
avatar
n*d
4
【 以下文字转载自 Linux 讨论区 】
发信人: noid (DoIneedit?), 信区: Linux
标 题: Semaphores in Linux
发信站: BBS 未名空间站 (Sat Jan 10 00:14:53 2009)
http://www.linuxdevcenter.com/pub/a/linux/2007/05/24/semaphores-in-linux.html?page=1
in this link, the author says "In general, the older Unix-based systems uses
the System V version and the current Linux-based systems use the POSIX
version."
The System V uses semget()... and POSIX uses sem_init...
However, in my company's Linux system, the gcc compiles semget()...
succesfu
avatar
t*3
5
Asset Pricing是不是给人感觉是体力活的样子?
avatar
h*e
6
保险能cover就拔。
avatar
T*9
7
头文件不一样

uses

【在 n**d 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 发信人: noid (DoIneedit?), 信区: Linux
: 标 题: Semaphores in Linux
: 发信站: BBS 未名空间站 (Sat Jan 10 00:14:53 2009)
: http://www.linuxdevcenter.com/pub/a/linux/2007/05/24/semaphores-in-linux.html?page=1
: in this link, the author says "In general, the older Unix-based systems uses
: the System V version and the current Linux-based systems use the POSIX
: version."
: The System V uses semget()... and POSIX uses sem_init...
: However, in my company's Linux system, the gcc compiles semget()...

avatar
h*g
8
有保险吗? 没有保险拔智齿很贵的。

【在 l*******v 的大作中提到】
: 今天去洗牙, 华人医生说有一个智齿坏了,要拔,
: 相应地下面那颗也要拔
: 另一边的两颗, 没问题,也要拔掉, 我答应了。
: 看了精华区, 有点害怕了。
: 后悔不注意口腔卫生,自己的牙齿白亮,从来没毛病
: 经常不刷牙,结果智齿坏了。

avatar
n*d
9
I know the differnce between System V and POSIX for Semaphore. My question
is what kind of Semaphore Linux supports, System V or POSIX.

【在 T*****9 的大作中提到】
: 头文件不一样
:
: uses

avatar
k*m
10
有保险也可能自己负担不小的一部分,还有副作用和风险。
牙医投诉的案例太多,自己谨慎为妙。

【在 h******e 的大作中提到】
: 保险能cover就拔。
avatar
T*9
11
try to use the -lphread option when you compiler with gcc

【在 n**d 的大作中提到】
: I know the differnce between System V and POSIX for Semaphore. My question
: is what kind of Semaphore Linux supports, System V or POSIX.

avatar
n*d
12
Yes, we can use gcc with -lrt or -lpthread to pass compile and link. What
does it mean? So can we say Linux supports both kinds of Semaphores?

【在 T*****9 的大作中提到】
: try to use the -lphread option when you compiler with gcc
avatar
r*r
13
不奇怪. 可能两种都支持. Sys V 的强大, 但难用.
Posix 语义更清楚. 经常是 posix 的用 sys v 来实现, 本身只是一个wrapper.
但是 posix 又分两种, 有名的是 sem_open, 无名是 sem_init.
有可能系统只支持 sem_open, 因为 sem_init 只能用于线程, 不能用作 ipc.
avatar
n*d
14
How do we use System V Semaphores for unrelated processes (not forked one)?
Some example code uses Ftok("filename" ...) to generate the key. So if the 2
processes use the same filename then they can get the same key.
More often, we use IPC_PRIVATE for the key. In this case, how can the 2
processes get the same key? Does that mean we have to use Ftok() if we want
to use Sys V Semaphores for 2 unrelated processes?

【在 r*********r 的大作中提到】
: 不奇怪. 可能两种都支持. Sys V 的强大, 但难用.
: Posix 语义更清楚. 经常是 posix 的用 sys v 来实现, 本身只是一个wrapper.
: 但是 posix 又分两种, 有名的是 sem_open, 无名是 sem_init.
: 有可能系统只支持 sem_open, 因为 sem_init 只能用于线程, 不能用作 ipc.

avatar
r*r
15
用 IPC_PRIVATE 就不能 share.
avatar
n*d
16
Besides Ftok(), is there any other way?

【在 r*********r 的大作中提到】
: 用 IPC_PRIVATE 就不能 share.
avatar
r*r
17
如果你已经通过其它方法拿到了 key (比如 ipcs), 就不需要 ftok.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。