From: Jake H. <jh...@po...> - 2005-02-22 20:49:58
|
Here's a quick heads-up on my kernel progress. Yesterday I integrated Arno's patches and now I can boot in SMP mode on my P4. Whoohoo! The bad news is that I'm still getting random lockups every now and then, but that's been happening for a while, SMP or no. My next check-in will be Arno's patches plus commenting out the microsecond timer code and the beginnings of the C99 stuff. I'm pulling in the C99 code one file at a time so that I can figure out which one is causing the early crash. The size of the diffs wasn't as big as I was afraid of, so I'll probably check in all the rest of the C99/typesafety patches in one step, after I verify that I can rebuild all the drivers and filesystems, as well as libsyllable and the appserver and run them w/o any problems or crashes. There is still one problem with GCC 3.4.3 which is that it occasionally generates code which requires memcpy(), which is only available as an inline function in kernel land. If you don't add "-ffreestanding" then it sometimes also requires strcpy(). This didn't affect any of the filesystems and only affected one driver (emu10k1) so I just added a "gcc34_memcpy.c" file to that build like I did for the kernel. But the -ffreestanding flag is supposed to prevent this kind of code from being generated so I would like to know whether it's a bug in GCC itself or in our port specifically. In other news: two links I found interesting. First, I started reading an O'Reilly book on unit testing and it mentioned this clever example of a unit testing framework for C programs in just three lines of code: http://www.jera.com/techinfo/jtns/jtn002.html So I am going to start writing some unit tests for the kernel that could be optionally compiled to run while the kernel is booting to test the various features. I'm also going to add a kassertp() macro to panic if the assertion fails, as kassertw() just gives a warning and continues, which may not be a good idea if the assertion failure indicates some sort of data structure corruption. The other link I found was to an interesting project called NetKernel, which is a microkernel developed for running web services. There may be one or two concepts that we could integrate into Syllable, for example using URIs to address software components: http://www.1060research.com/netkernel/ -Jake |