由买买提看人间百态

topics

全部话题 - 话题: posix
1 2 3 4 5 6 7 下页 末页 (共7页)
K******g
发帖数: 1870
1
来自主题: JobHunting版 - 请教一个关于POSIX的面试题
Review and critique the POSIX Threads API from a performance, reliability
and scalability point of view. What scalability can be achieved and expected
from multi-threaded applications that rely on POSIX threads? Can POSIX
threads be implemented in an efficient and scalable manner in a UNIX kernel
for a virtual memory symmetrical multi-processor system? If so, how should
they be designed?
有人可以给点提示让我找到切入点来分析这个问题吗?多谢
p*******5
发帖数: 76
2
来自主题: JobHunting版 - 求教神码是 Unix/Posix programming
求教,Unix programming 和 Posix programming 是一会事么?
我只知道有shell programming 和多C++多线程时用过 Posix thread,
就教有必要去学这两个东西么?
d**d
发帖数: 389
3
【 以下文字转载自 Programming 讨论区 】
发信人: dxxd (东邪西毒), 信区: Programming
标 题: 请教一个linux下的POSIX timer的问题。
发信站: BBS 未名空间站 (Fri May 13 17:06:15 2011, 美东)
我用linux下面的POSIX timer, timer_create(),timer_settime(),
为什么在调用了timer_settime()以后,立马就有一个time-out callback? 然后再每过
5秒后有一个time out?
难道不是我调用timer_settime()以后,timer开始计时, 等到5秒以后再出现第一
time out callback 吗?
非常感谢!
代码如下:
#include
#include
#include
#include
#include
void
handle (sigval_t v)
{
tim... 阅读全帖
M********5
发帖数: 715
4
来自主题: JobHunting版 - 求教神码是 Unix/Posix programming
unix programming包括的东西太多了,而且还不知道你是哪一层的programming,
system level的,还是application level的,有一本书叫做advanced programming in
unix environment,你想看一下子是不可能学会的,我看了好几遍也都还没完全弄明白
shell只是脚本语言的一种
posix thread只是multi-threading的一种standard,unix下面的c,c++的好多multi-
threading会比较经常用到这个,这个你估计也一下子难得学会
w***u
发帖数: 156
5
来自主题: JobHunting版 - c++posix多线程问题请教 (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: wyseu (wy_seu), 信区: Programming
标 题: c++posix多线程问题请教
关键字: 多线程
发信站: BBS 未名空间站 (Wed Feb 18 03:19:44 2015, 美东)
最近要写一个多线程的应用, 碰到一些问题,
主线程在一开始就create好4个子线程,子线程一开始wait状态,然后主线程开始往下
走,开始task准备分给子线程,然后broadcast给子线程,自己进入wait状态, 子线程
wakeup,做完task,就wait,做后一个子线程完成后,发信号给主线程,然后wait,
主线程在接到信号后,wakeup,继续下一个task, 然后broadcast。问题是主线程激活
到broadcast时间很短, 而子线程从发信号到wait时间长的话,主线程broadcast的信
号就不会正确叫醒子线程,因为那时的子线程还没有进入wait状态。 如何解决呢?其
实就是要实现一个join的功能,但是又不要释放掉子线程,
w***u
发帖数: 156
6
【 以下文字转载自 Programming 讨论区 】
发信人: wyseu (wy_seu), 信区: Programming
标 题: c++posix多线程问题请教
关键字: 多线程
发信站: BBS 未名空间站 (Wed Feb 18 03:19:44 2015, 美东)
最近要写一个多线程的应用, 碰到一些问题,
主线程在一开始就create好4个子线程,子线程一开始wait状态,然后主线程开始往下
走,开始task准备分给子线程,然后broadcast给子线程,自己进入wait状态, 子线程
wakeup,做完task,就wait,做后一个子线程完成后,发信号给主线程,然后wait,
主线程在接到信号后,wakeup,继续下一个task, 然后broadcast。问题是主线程激活
到broadcast时间很短, 而子线程从发信号到wait时间长的话,主线程broadcast的信
号就不会正确叫醒子线程,因为那时的子线程还没有进入wait状态。 如何解决呢?其
实就是要实现一个join的功能,但是又不要释放掉子线程,
g***l
发帖数: 2753
7
POSIX适合IPC,想找一个轻量级别的用于一个进程中的多个线程传递消息用的。
或者有什么open source的也可以啊。
非常感谢
o*******a
发帖数: 46
8
【 以下文字转载自 JobHunting 讨论区,原文如下 】
发信人: oolongTea (低调,实干,宽容), 信区: JobHunting
标 题: Unix/Posix system programming training
发信站: Unknown Space - 未名空间 (Wed May 18 19:49:04 2005) WWW-POST
有谁知道那个培训公司的课程最好吗?
谢谢
d**d
发帖数: 389
9
来自主题: Programming版 - 请教一个linux下的POSIX timer的问题。
我用linux下面的POSIX timer, timer_create(),timer_settime(),
为什么在调用了timer_settime()以后,立马就有一个time-out callback? 然后再每过
5秒后有一个time out?
难道不是我调用timer_settime()以后,timer开始计时, 等到5秒以后再出现第一
time out callback 吗?
非常感谢!
代码如下:
#include
#include
#include
#include
#include
void
handle (sigval_t v)
{
time_t t;
char p[32];
time (&t);
strftime(p,sizeof(p),"%T ",localtime(&t));
printf("%s thread 0x%x,val=%d,signal captured.... 阅读全帖
o*******a
发帖数: 46
10
【 以下文字转载自 JobHunting 讨论区,原文如下 】
发信人: oolongTea (低调,实干,宽容), 信区: JobHunting
标 题: Unix/Posix system programming training
发信站: Unknown Space - 未名空间 (Wed May 18 19:49:04 2005) WWW-POST
有谁知道那个培训公司的课程最好吗?
谢谢
E*V
发帖数: 17544
11
来自主题: Linux版 - 继续批评 gentoo
我看看
locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
B*V
发帖数: 3365
12
来自主题: Military版 - 科普,unix的意思有广义,狭义
Windows NT and the POSIX Checkbox
The U.S. government has always been a fan of standards, and POSIX was no
exception. Many government agencies specify POSIX as a requirement. This was
a significant problem for one vendor, which had quite a large portion of
the operating systems market. Microsoft DOS wasn’t POSIX-complaint, and
since it also wasn’t UNIX-based, making DOS POSIX-compliant would have
taken a lot of effort.
Microsoft’s new operating system, Windows NT, was designed with the ability
t... 阅读全帖
f***c
发帖数: 338
13
来自主题: Programming版 - 问问g++, gcc, cc之间的关系
写了一段代码,用g++编译顺利通过。
想到前几天曾讨论过编译器对int main(),void main()的处理不同问题,就顺手试了cc
和gcc。这一试不打紧,居然都不能通过。
OS: Debian GNU/Linux 6.0.3 (squeeze)
然后就看看个编译器的version,居然是一样的。但是对同样的代码的编译处理区别怎
么这么大呢?
彻底懵了,请达人解惑,谢谢。
g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --
with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c
++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared
--enable-multiarch --enab... 阅读全帖
R*******c
发帖数: 249
14
搞了三四天了,还是没成功,实在是崩溃了。。。只能上来请大牛们帮忙看看问题出在哪?
从网上下载了一个R的package(一个zip文件),这个包是在mac上build的,在mac里运行没有
问题,我现在想在windows下用这个包,直接通过R里面的install package from local
zip file会有错误如下:
Error in gzfile(file, "r") : cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip
file
2: In gzfile(file, "r") :
cannot open compressed file 'curves2_1.0.1.tar.gz/DESCRIPTION',
probable reason 'No such file or directory'
所以决定先将zip文件解压缩成文件夹,然后在windows下把这个包buil... 阅读全帖
d****i
发帖数: 4809
15
来自主题: Programming版 - btw, MS C++ 是ECMA-372标准
Please take a look at:
http://en.wikipedia.org/wiki/POSIX
Windows 2000 does not provide POSIX compatibility by default, you have to
download and install Windows Services for UNIX (SFU). Also, the kernel of
Windows does not resemble other Unix or POSIX systems. So Windows can not be
called POSIX compliant because it does not support POSIX API natively.
g****e
发帖数: 141
16
plz send resume to g****[email protected]
thanks
【 以下文字转载自 JobMarket 讨论区 】
发信人: gstide (豆腐脑), 信区: JobMarket
标 题: software engineer in northern virginia
发信站: BBS 未名空间站 (Mon Jun 20 18:45:25 2011, 美东)
职位1:经验不限
Skills ideal to have:
•C++, HTML/XML/JavaScript, Perl, POSIX, TCP/IP, SQL, Web Programming
Education:
•BS/MS in Computer Science or equivalent work experience.
Strong problem solving skills or hands-on-experience with the following:
•Experience with a relational database, such ... 阅读全帖
g****e
发帖数: 141
17
来自主题: JobMarket版 - software engineer in northern virginia
plz send resume to g****[email protected]
thanks
职位1:经验不限
Skills ideal to have:
•C++, HTML/XML/JavaScript, Perl, POSIX, TCP/IP, SQL, Web Programming
Education:
•BS/MS in Computer Science or equivalent work experience.
Strong problem solving skills or hands-on-experience with the following:
•Experience with a relational database, such as MySQL or Postgresql.
•Experience with a web programming framework, such as JQuery or
Prototype.
•Experiences with a POSIX operating sys... 阅读全帖
w***g
发帖数: 5958
18
来自主题: Programming版 - ubuntu on windows
这个我以前科普过的。Windows NT是一个非常牛B
的模块化设计。NT内核的功能是通过不同的subsystem
expose出来的,包括一个win32 subsystem和posix subsystem。
win32 subsystem和win 95/98的win32 API二进制兼容,就是
一般人看到的windows。win 95/98和NT/2000/XP内核完全不同,
但是能实现app的二进制兼容,就是通过的win32 subsystem
实现的。Posix subsystem一般人不知道,软软自己也不推广,
但确实是标准的posix。上面可以装一套windows services for unix,
然后config, make, NFS, sh啥的都有。这个十多年前我都玩过的。
从技术上来说, win32 API比posix是不是更科学难说,但从技术上来说要
复杂得多,投进去的钱也要大得多,就软软来说赚到得钱也大的多。
谁能预料得到陈年往事又要被挖出来。真是非战之罪也。
Commercial的操统,不管是AIX, Solaris还是Windows NT,
哪个在技术上不秒... 阅读全帖
p*********w
发帖数: 606
19
来自主题: Classified版 - 通讯公司招software engineer
我们公司最近要招聘若干software engineer以及embedded engineer, both mid and
senior level. 公司是一个中型公司,6,700人的规模,总部在herndon, va. 支持h1b
公司中国人很多,我希望能在多refer些中国人到公司来。
有兴趣的请将简历发到[email protected]
/* */
职位说明太长,我下面主要贴职位需要的technical requirement。
===========================================================
这两个职位有若干,both mid level and senior level。是我们组,头是中国人,很
nice
Senior Software Engineer - Software Protcols & Applications
Solid experience with C++ and object oriented design and development.
Strong experien... 阅读全帖
p*********w
发帖数: 606
20
来自主题: JobHunting版 - 通讯公司招software engineer
【 以下文字转载自 WashingtonDC 讨论区 】
发信人: philofellow (大智若愚), 信区: WashingtonDC
标 题: 通讯公司招software engineer
发信站: BBS 未名空间站 (Tue Jan 27 11:51:48 2015, 美东)
我们公司最近要招聘若干software engineer以及embedded engineer, both mid and
senior level. 公司是一个中型公司,6,700人的规模,总部在herndon, va. 支持h1b
公司中国人很多,我希望能在多refer些中国人到公司来。
有兴趣的请将简历发到[email protected]
/* */
职位说明太长,我下面主要贴职位需要的technical requirement。
===========================================================
这两个职位有若干,both mid level and senior level。是我们组,头是中国人,很
nice
Senior ... 阅读全帖
p*********w
发帖数: 606
21
来自主题: WashingtonDC版 - 通讯公司招software engineer
我们公司最近要招聘若干software engineer以及embedded engineer, both mid and
senior level. 公司是一个中型公司,6,700人的规模,总部在herndon, va. 支持h1b
公司中国人很多,我希望能在多refer些中国人到公司来。
有兴趣的请将简历发到[email protected]
/* */
职位说明太长,我下面主要贴职位需要的technical requirement。
===========================================================
这两个职位有若干,both mid level and senior level。是我们组,头是中国人,很
nice
Senior Software Engineer - Software Protcols & Applications
Solid experience with C++ and object oriented design and development.
Strong experien... 阅读全帖
d********g
发帖数: 10550
22
这几年ThinkPad在果机审美观的冲击下改来改去,现在感觉新款已经走在正确路上了
1. 传统键盘变巧克力,大家应该也习惯这手感了,其实还不错
2. 保留小红点,100个赞!
3. 仿果机多点触摸板,体验还不如果机但是比较接近了。T440s乱改小红点按键现在
T450s又改回去,另外把按键的转轴从上端换到下端,个人感觉更合理而且手感更好
4. 取消键盘顶灯,屏幕不再有一个罩子一样突出的边缘
之前ThinkPad的各种瞎折腾导致大量忠实用户流失,加上Windows 8/8.1更加瞎搞,真
是一段不堪回首的日子
Windows如果能再实现一个POSIX的壳就完美了。Mac这么流行不光是个人用户,互联网
公司基本都是Mac因为开发方便,但是OS X不如Windows稳定,慢,还越做越烂。微软
TypeScript已经借Angular 2发力,要是POSIX给做出来,应该也会拿下开源界很大一块
市场。Cygwin这种游击队都可以,凭微软的家底要憋个POSIX出来还不是分分钟的事
r*********r
发帖数: 3195
23
来自主题: Programming版 - Semaphores in Linux (转载)
不奇怪. 可能两种都支持. Sys V 的强大, 但难用.
Posix 语义更清楚. 经常是 posix 的用 sys v 来实现, 本身只是一个wrapper.
但是 posix 又分两种, 有名的是 sem_open, 无名是 sem_init.
有可能系统只支持 sem_open, 因为 sem_init 只能用于线程, 不能用作 ipc.
t****t
发帖数: 6806
24
来自主题: Programming版 - Oracle v Google on Java
现在的*nix几乎都照着POSIX来, 至少90%吧. 你说printf太小, 那POSIX总够大了吧.
你能想像POSIX被copyright吗?
S**I
发帖数: 15689
25
来自主题: Programming版 - btw, MS C++ 是ECMA-372标准
POSIX compliant的字面意义该如何理解是个见仁见智的问题;反正Windows也是支持
POSIX的,这个没啥疑问吧?POSIX标准对内核又没要求。

be
d****i
发帖数: 4809
26
这个要加些什么东西on top of windows吧,再说POSIX comliant并不意味着是UNIX啊
,很多RTOS都是POSIX-compliant,但是不是UNIX,比如VxWorks和Integrity,虽然提
供了POSIX system call API。只有Single UNIX specification认证的操作系统才是吧
,连Linux都不是。
g****e
发帖数: 141
27
工作地点在northern Virginia 有意者请发resume至g****[email protected] 谢谢!
Key Job Responsibilities include:
Participate in determining the future direction of the Network Management
System in the areas of infrastructure, redundancy, scalability, and high
availability system.
Play an active role in the development and deployment of the Next-Generation
Network Management System.
Qualifications
Skills ideal to have:
C++, POSIX, SQL, Socket Programming, Inter-process communication (IPC)
Education:
BS/MS in Compute... 阅读全帖
g****e
发帖数: 141
28
工作地点在northern Virginia 有意者请发resume至g****[email protected]
本地、外地均可申请。
本人n年上站一次,所以请勿发站内信。谢谢!
Implement, test and integrate network management software to control large
networks of VSAT modems.
Participate in determining the future direction of the Network Management
System in the areas of infrastructure, redundancy, scalability, and high
availability system.
Play an active role in the development and deployment of the "Next-
Generation" Network Management System.
Qualifications
Skills ideal to have:
... 阅读全帖
g****e
发帖数: 141
29
来自主题: JobMarket版 - 急招associate and mid level C++ engineer
公司不错,在northern Virginia 这些年一直高增长。现在招c++ engineer。
plz send resume to g****[email protected]
thanks
面試要求懂C++, Linux Posix programming
OS概念,懂linux kernel and driver更好
network programming
在此強調一下,C++是必須要懂的,這是重點。雖然entry level要求要低一些,但是基
本概念也都要知道。
linux posix programing,有本書Advanced Programming in the UNIX Environment,
中文版也到處都是。有意搞linux編程的可以好好看看。不要求多精通,還是那句,基
本概念要知道。
OS的概念也都得懂。(很多應聘者連threaed/process/address space都說不清,OS課
咋上的?)
mid level當然要求要更高一些。
希望各位tx踴躍報名!Team希望能找到滿足要求的新畢業生。
g******r
发帖数: 292
30
来自主题: SanFrancisco版 - 问个技术问题
POSIX 中的 function: pthread_cond_wait(&cond, &mutex);
为什么 wait condition 需要用到 mutex? 如果我要保护资源, 完全可以用别的
mutex, 没必要一定放到和wait condition 一起用吧?
而且我发现POSIX中没有等multiple conditions 的function, 象WIN32 中的
WaitForMultipleObject 那样的????
f*******r
发帖数: 1
31
来自主题: SanFrancisco版 - 【JOBS】02.01 -- 02.14 职位空缺、求职
There are four software engineer positions available at www.ricoh-ews.com.
If interested, please send your resume to
Corinne Fotenos
Staffing/HR
EWS-Ricoh Innovations
(408) 501-3032
c*****[email protected]
www.ricoh-ews.com
1) Senior Embedded Software Engineer
Ricoh EWS is looking for an experienced embedded software engineer to
develop the low-level software system including kernel, device drivers as
well as middleware for a leading-edge embedded product, the Ricoh EWS device
. In this position,... 阅读全帖
y***u
发帖数: 5243
32
什么叫就算我说的情况属实,那本来就是事实。
apple的系统兼容性还不强?你知道POSIX是什么么?你知道实际上WIndowsNT也是POSIX
兼容系统么?你知道真正破坏兼容性的是微软么?你难道真的以为微软派驻了无数人员
到全世界各个windows only的软件公司去开发软件么?
至于说硬件兼容,你知道实际上大部分钱不是让苹果赚走了,而是让third party的中
国公司赚走了么?别傻傻地以为apple所有动作都是为了赚钱而已。每个接口出来都是
解决了特定地问题,在当时甚至直到现在都是领先地(style也好,tech也好)。
你觉得他们操蛋可以啊,我也觉得你很文科啊哈哈
J********a
发帖数: 5208
33
en
如果windows有一个合理的posix layer & gnu tools (not cygwin crap)
或者Linux有一套合理的办公软件
Mac实在没有什么优势
但是现实是Windows没有合理的posix layer,linux没有合理的办公软件,Mac虽然都不
是最好的,却是唯一二者兼得的。
又或者这么说,OSX是目前最好的Unix桌面操作系统,如果你需要Unix,又需要桌面,
那么Mac就是最好的选择。什么工业设计啊都是浮云

user
board
r****y
发帖数: 26819
34
来自主题: Apple版 - 教主比盖茨还是牛一点
While unrelated to Mac OS X, Apple came out with their version of UNIX,
called A/UX, in 1988. A/UX was a POSIX compliant system based on AT&T UNIX
System V (various releases) and BSD4.2/4.3, with a wide spectrum of features
(STREAMS, TCP/IP, FFS, job control, NFS with YP, SCCS, printing, X Window
System, compatibility with SYSV and BSD in addition to POSIX, and so on).
More importantly, A/UX combined various features of the Macintosh with Unix
- A/UX 3.x was a combination of the above mentioned ... 阅读全帖
a***y
发帖数: 19743
35
来自主题: Apple版 - [合集] 随着os4的退出
☆─────────────────────────────────────☆
ronaldinho10 (苹果,微软,狗狗) 于 (Thu Apr 8 21:58:49 2010, 美东) 提到:
不好意思,是推出 —— 我觉得爱愤在智能手机里至少又可以安心的坐稳两年。
☆─────────────────────────────────────☆
lint (take it easy) 于 (Thu Apr 8 22:01:13 2010, 美东) 提到:
光个os4不行,还是没android自由牛x,看iPhone4怎样了
希望是个真正的ultimate phone,偶也进个把玩把玩

☆─────────────────────────────────────☆
ronaldinho10 (苹果,微软,狗狗) 于 (Thu Apr 8 22:04:51 2010, 美东) 提到:
如果爱愤能装多系统就好了
☆─────────────────────────────────────☆
lint (take it easy) 于 (Th... 阅读全帖
a***y
发帖数: 19743
36
来自主题: Apple版 - [合集] 只有电脑盲才用Mac!
☆─────────────────────────────────────☆
pengmao (久易) 于 (Fri Jun 25 18:20:39 2010, 美东) 提到:
为什么那么多人爱上Mac?
因为太多电脑盲了,Mac是绝对的傻瓜电脑,什么都不能改,不懂电脑的人随便怎么搞
,怎么弄,程序都弄不坏,不会中病毒,因为他没发布源码,源码发布了病毒照样马天
飞。
还是windows好,操控性强,会用 windows的才是会用电脑的人。
☆─────────────────────────────────────☆
aaaty (阿fan提) 于 (Fri Jun 25 18:22:42 2010, 美东) 提到:
源代码开放程度
Linux > Mac > Windows
用户数
Windows > Mac > Linux
病毒数
Windows >> Mac ~= Linux

☆─────────────────────────────────────☆
pengmao (久易) 于 (Fri Jun 25 18:28:37 2010, 美东) ... 阅读全帖
a****a
发帖数: 5763
37
在美国宾夕法尼亚州的东部,有一个风景秀美的城市叫费城。在这个城市诞生了一系列
改变世界的奇迹:第一个三权分立的国家——美立坚合众国,就在第五街的路口诞生;
举世闻名的费城交响乐团,1900年在市中心的Academy of Music奏响了他们的第一个音
符。而写这篇文章时,我正坐在三十四街的宾夕法尼亚大学计算机系的一楼实验室,面
前摆放着世界上第一台电子计算机——ENIAC。
1946年2月14日,ENIAC问世,每秒可运行5000次加法运算或500次乘法运算,面积达170
平方米,重约30吨,拉开了计算机处理器革命的序幕。这场革命是各处理器厂商长达数
十年的竞赛,而摩尔定律从一开始就准确地预测了这场比赛的走势。根据摩尔定律,同
样价格的集成电路上可容纳的晶体管数目,每隔约18个月便会增加一倍,性能也将提升
一倍。但事实上,并无法用老路子来保持这个增长速度,因为会遇到包括能耗、散热等
各种技术瓶颈。所以每隔几年就会有用来绕过这些瓶颈的新一代产品推出。如采用超纯
量(superscala)、指令管线化、快取等。这些技术通过一定程度的高效并行来挖掘计
算机处理器的速度所能达到的高度,以促使... 阅读全帖
q*p
发帖数: 963
38
来自主题: Hardware版 - 7zip到底靠谱不靠谱啊?
源于lzma,但青出于蓝而胜于蓝。
7z是LZMA,xz是LZMA2。
xz现在大行其道。
XZ Utils
XZ Utils is free general-purpose data compression software with high
compression ratio. XZ Utils were written for POSIX-like systems, but also
work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
The core of the XZ Utils compression code is based on LZMA SDK, but it has
been modified quite a lot to be suitable for XZ Utils. The primary
compression algorithm is currently LZMA2, which is used inside the .xz
container fo... 阅读全帖
S*A
发帖数: 7142
39
来自主题: Linux版 - Process and Thread

Define "within".
The thread shared signal and virtual memory with the process,
does it count as "within"?
The thread is a schedule-able task just like process in Linux.
The only different with process is that it share signal and memory.
Kernel level.
No, that is not how it works now. User level threads are nightmares
when you deal with file io and sockets.
You can read a little bit more about the linux "clone" system call.
As far as I can tell, clone can be used to implement POSIX compatible
th... 阅读全帖
d*********8
发帖数: 2192
40
概念要清楚。
头文件至少有三类。
system/kernel api, 比如read() write()。WINDOWS是支持大部分POSIX的,所以不用
担心。但是除了POSIX之外,还有很多LINUX/UNIX独有的。比如fork()。你不用CYWIN的
话,想移植这个跟自己做个CYWIN也差不了多少了。也可以用一些可移植的库,比如
APACHE 的APR, poco等等,但是估计要大动源代码了。
第二类 c runtime
这个所有C/C++编译器都支持,只是各家的扩展略有不同。比如STDIO.H就是这类。
第三类:程序自己的东西,比如filter\mean.h这个就得你自己去修改编译参数,让编
译器找到这个文件。
总之,不用CYWIN或者可移植库,假定源代码在20000行的话,工作量跟你重新写差不多。
你可以参考那些在UNIX/WINDOWS下都有的开源软件,比如squid, apache看看他们是怎
么做的。
d****i
发帖数: 4809
41
来自主题: Linux版 - 为什么linux是portable?
C语言的国际标准是ANSI, ISO, 然后对于操作系统来说,内核都是C写的然后编译出来
,kernel到userland, UNIX类操作系统都支持POSIX标准,然后对于用在嵌入式实时操
作系统,除了标准的ANSI,POSIX以外,还加了适用于有自己操作系统特色的东西,所
以C可以用在任何大大小小的OS上。

C
dependent
T*******i
发帖数: 4992
42
posix thread是standard。
nptl取代了linuxthread。nptl是posix thread的一个implementation。
t****t
发帖数: 6806
43
I am not sure how to alias an entire module (I read through the document and
did some test, seems not work). But you can definitely alias a few
functions, such as:
require POSIX;
local *alias::floor = \&POSIX::floor;
alias::floor(0.5);
n**d
发帖数: 9764
44
来自主题: Programming版 - Semaphores in Linux (转载)
【 以下文字转载自 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
n**d
发帖数: 9764
45
来自主题: Programming版 - Semaphores in Linux (转载)
I know the differnce between System V and POSIX for Semaphore. My question
is what kind of Semaphore Linux supports, System V or POSIX.
j*a
发帖数: 14423
46
来自主题: Programming版 - 帮忙看看怎么理解这个指针
从man dlopen里面看来的
/* Writing: cosine = (double (*)(double)) dlsym(handle, "cos");
would seem more natural, but the C99 standard leaves
casting from "void *" to a function pointer undefined.
The assignment used below is the POSIX.1-2003 (Technical
Corrigendum 1) workaround; see the Rationale for the
POSIX specification of dlsym(). */
*(void **) (&cosine) = dlsym(handle, "cos");
i*****o
发帖数: 1714
47
来自主题: Programming版 - Oracle v Google on Java
我要求的只是可以copyright我自己API的权力。我自己辛辛苦苦设计出来的东西为什么
就不受保护,别人可以随便抄?
POSIX要不要copyright是它们自己的事。你认为它copyright(或者要钱)后还会有多
少人用它的?posix也不是唯一的可以用的,大家合伙一起搞另外一个standard也不是
什么难事。大家抄它的还不是因为它是可以free抄的。
1 2 3 4 5 6 7 下页 末页 (共7页)