*Nix and Win32 Kernel
FreeBSD CLang/LLVM项目终于进svn了
如题。
不过这一次因为-CURRENT code slush的缘故,应该不会在 8.0-CURRENT 里面引入了(Ed在svn里面建立了另一个branch来做)。我想从各方面考虑,9.0-RELEASE里面正式砍掉gcc那一套东西应该不会是很困难的事情。传统上 FreeBSD 的代码用到了很多gcc的扩展,因此可能还需要一段时间。
阅读全文…为什么FreeBSD没有CIRCLEQ_*
最近在看 Berkeley DB,发现一套 FreeBSD 上没有的宏, CIRCLEQ_*
。
看了一下,这组宏是来自 4.4BSD 的,因此 FreeBSD 曾经有过这个宏;后来, phk 在 2000 年 12 月 29 日从 FreeBSD 里面把它拿掉了(SVN revision 70469),当时的说明如下:
阅读全文…一个问题请教WxWidget高手
WxClassInfo的析构函数(~WxClassInfo)死循环是什么原因?检查发现RTTI的那个链表有个环,但是不太明白这个表(从上下文看是由Register()方法维护的)为什么能出现环?
阅读全文…BeOS Reborn: Haiku
Pretty interesting project: Haiku.
It looks like that it uses a lot of FreeBSD code by creating glue between FreeBSD and BeOS API, on the other hand they are using MIT license for most of their code, making sharing code easy.
参与评论Progress on LLVM clang
As some of you already know, FreeBSD, along with some other Open Source projects, is moving away from GCC due to GPLv3. From a technology perspective, this also makes sense since the (likely) candidate, BSD-style licensed, LLVM based clang, a C compiler, is making reasonably good progress.
So, what should we expect from LLVM or clang?
Here is a good comparison between GCC and clang. Despite GCC is popular, considerably more mature, and supports more languages (especially C++, which clang’s support is incomplete at this moment), clang provides cleaner AST (Abstract Syntax Tree), much more modularized (if you take a look at GCC’s history, Richard Stallman intentionally made GCC’s code not reusable in other software), provided much more information for optimizer, is much faster and use much less memory, etc.
For FreeBSD, currently, clang can compile its kernel with only very few tweaks.
阅读全文…New strlen(3) committed
Finally, I got my strlen(3) [1] committed against -HEAD. This is a long story, to put it short, I had proposed assembly version of some string operations at the point of 2005, but these was never committed due to a hard disk failure, and as Bruce pointed out, having the hand optimized assembly code use a different algorithm is not good in general.
Therefore, I have take some time on it and reimplemented the idea in C, resulting in a portable (say, you can use it on any 32-bit or 64-bit processors, and it can be easily extended to 128-bit) version.
So, is it important for *YOU*?
Generally speaking, it should not. Performance sensitive programs should, by all means, avoid C style string operations. Think a 5x better strlen(3) would boost performance of your application since it uses strlen(3) in critical path? Think again!
However, I found it valuable. There is difference in worldstone, where I saw some minor improvements. Micro-benchmark indicates that this version is at most 2x slower when the string is very short, but 5x faster for strings that is at least word-length long.
[1] Note: the version has been further revised to provide better comment and match style(9).
阅读全文…POSIX.1-2008电子版终于发布
有 HTML 和 PDF 两种版本,详见 OpenGroup书店。
参与评论作弊条:如何远程启用/上面的SoftUpdates
说明:这个实际上是一个workaround,不过我暂时没时间修这个bug。这是一个作弊条,主要目的在于解决这一特定问题而非阐述其背后的原理和最佳实践。
阅读全文…FreeBSD 6.x系列走向终结
很快就要正式发布FreeBSD 6.x系列的最后一个(第五个)版本了。FreeBSD 5-STABLE发表了3个版本(5.3、5.4、5.5),FreeBSD 6-STABLE比它多两个。我对于FreeBSD 6.x系列在6.2之后的发展基本上不太满意,这次这个版本我想也是类似地,修正了一些之前版本的bug,增加了一些新硬件支持,但是显然这些与7.1-RELEASE相比是远远不够的。个人建议现有的6.x用户升级到7.1-RELEASE。
参与评论关于大量静态页的想法
上次在MeetBSD的时候Tim提到了一种处理大量静态页的办法。今天看Squid开发人员在NYC的BSD活动上的一个演讲里面也介绍了各种方法处理I/O的区别。
阅读全文…