Re: rpc.lockd and true NFS locks?

2000-12-17 Thread Doug Barton
Don Coleman wrote: David, I wrote the NFS lockd code for BSD/OS (it's based on some user land stuff Keith Bostic did, and then Kirk McKusick helped clean up my basic design and the VFS layering for the server/kernel side). We have an application that is desperately in need of

Re: kernel type

2000-12-17 Thread Andrew Reilly
On Sat, Dec 16, 2000 at 06:37:56PM -0800, Jordan Hubbard wrote: PS. Before this starts a flame war, let me say that I really believe that MacOS X is a very good thing for everyone involved, although the choice of Mach for the microkernel seems a little arbitrary if not misguided. It's

Re: kernel type

2000-12-17 Thread Jordan Hubbard
Yeah, but in what sense is that use of Mach a serious microkernel, if it's only got one server: BSD? I've never understood the point of that sort of use. It makes sense for a QNX or GNU/Hurd or minix or Amoeba style of architecture, but how does Mach help Apple, instead of using the bottom

Re: rpc.lockd and true NFS locks?

2000-12-17 Thread Axel Thimm
On Sat, Dec 16, 2000 at 04:27:20PM -0600, Dan Nelson wrote: In the last episode (Dec 16), Axel Thimm said: Wouldn't that mean, that you might cause data corruption if, say, I was to read my mail from a FreeBSD box over an NFS mounted spool directory (running under OSF1 in our case), and I

Writing Device Drivers

2000-12-17 Thread Jamie Heckford
Hello, I am very keen to develop for FreeBSD, and would like to start writing device drivers for various hardware that is unsupported. I have some knowledge of C, and have had a good read of "The design and Implementation of..." and bits and pieces of the kernel and driver sources. Does anyone

RE: ESS Sound Driver

2000-12-17 Thread Jamie Heckford
Hi, I got hold of you driver, compiled and installed it. After booting, I logged in as root and typed: # kldload snd_maestro3 but this returned the following error message: pcm0: ESS Technology Maestro3 at device 12.0 on pci0 pcm0: Unable to map i/o space device_probe_and_attach: pcm0

Re: kernel type

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 12:14:07AM +, Tony Finch wrote: Patryk Zadarnowski [EMAIL PROTECTED] wrote: Now that I think of it, there aren't many commercial microkernel systems out there with the possible exception of QNX and lots of little embedded toys. Mac OS X is based on Mach. Yes,

Re: kernel type

2000-12-17 Thread Nate Williams
PS. Before this starts a flame war, let me say that I really believe that MacOS X is a very good thing for everyone involved, although the choice of Mach for the microkernel seems a little arbitrary if not misguided. It's hardly arbitrary, though the jury's still out as to

Re: kernel type

2000-12-17 Thread Gustavo Vieira Goncalves Coelho Rios
Jordan Hubbard wrote: Yeah, but in what sense is that use of Mach a serious microkernel, if it's only got one server: BSD? I've never understood the point of that sort of use. It makes sense for a QNX or GNU/Hurd or minix or Amoeba style of architecture, but how does Mach help

Re: kernel type

2000-12-17 Thread Robert Watson
On Sun, 17 Dec 2000, Nate Williams wrote: Kernel threads out of the box? The Mach kernel makes use of a thread primitive and a task primitive; however, their BSD OS personality is largely single-threaded with something approximately equivilent to our Giant -- they refer to this as a "Funnel",

Re: kernel type

2000-12-17 Thread Nate Williams
Kernel threads out of the box? The Mach kernel makes use of a thread primitive and a task primitive; however, their BSD OS personality is largely single-threaded with something approximately equivilent to our Giant -- they refer to this as a "Funnel", through which access to the BSD code

Re: kernel type

2000-12-17 Thread Robert Watson
On Sat, 16 Dec 2000, Jordan Hubbard wrote: PS. Before this starts a flame war, let me say that I really believe that MacOS X is a very good thing for everyone involved, although the choice of Mach for the microkernel seems a little arbitrary if not misguided. It's hardly arbitrary,

Re: kernel type

2000-12-17 Thread Robert Watson
On Sun, 17 Dec 2000, Andrew Reilly wrote: Yeah, but in what sense is that use of Mach a serious microkernel, if it's only got one server: BSD? I've never understood the point of that sort of use. It makes sense for a QNX or GNU/Hurd or minix or Amoeba style of architecture, but how does

Re: kernel type

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 12:27:55PM -0500, Robert Watson wrote: -- I've been seriously considering looking at adapting FreeBSD to use netinfo also, given that it provides a time-tested model for configuration management (local and distributed). It probably needs some cleaning up in the

Re: kernel type

2000-12-17 Thread Robert Watson
On Sun, 17 Dec 2000, Jacques A. Vidrine wrote: On Sun, Dec 17, 2000 at 12:27:55PM -0500, Robert Watson wrote: -- I've been seriously considering looking at adapting FreeBSD to use netinfo also, given that it provides a time-tested model for configuration management (local and

Re: Writing Device Drivers

2000-12-17 Thread David Preece
At 13:02 17/12/00 +, you wrote: Does anyone have any good tips to get started / HowTo's, or some simple examples that will give me knowledge like the PC Speaker or something simple like that? This is turning into a FAQ, but don't worry about it. The usual answer is to take one of the

Re: kernel type

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 02:02:56PM -0500, Robert Watson wrote: That's great news -- I assume however that this is limited to the account directory service functionality, as opposed to the more general configuration parameters (login.conf equivs, etc)? That's correct, at least for the near

Re: kernel type

2000-12-17 Thread Jordan Hubbard
service environment -- I've been seriously considering looking at adapting FreeBSD to use netinfo also, given that it provides a time-tested model for configuration management (local and distributed). It probably needs some cleaning up in the security sense, and possibly rewriting, but it's

Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Jacques A. Vidrine
[This typo came from NetBSD, so in this particular source I have no intention of changing the style.] What do folks think about 1)if (data) free(data); versus 2)free(data); versus 3)#define xfree(x) if ((x) != NULL) free(x); xfree(data); --

Re: Why not another style thread? (was Re: cvs commit:src/lib/libc/gen getgrent.c)

2000-12-17 Thread Chris Costello
On Sunday, December 17, 2000, Jacques A. Vidrine wrote: What do folks think about 1)if (data) free(data); versus 2)free(data); versus 3)#define xfree(x) if ((x) != NULL) free(x); xfree(data); 2. The C standard dictates that free()

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Bosko Milekic
On Sun, 17 Dec 2000, Chris Costello wrote: On Sunday, December 17, 2000, Jacques A. Vidrine wrote: What do folks think about 1)if (data) free(data); versus 2)free(data); versus 3)#define xfree(x) if ((x) != NULL) free(x);

Re: Why not another style thread? (was Re: cvs commit:src/lib/libc/gen getgrent.c)

2000-12-17 Thread Chris Costello
On Sunday, December 17, 2000, Bosko Milekic wrote: Agreed. However, in the kernel, all free()s should be made as in (1), in my opinion. (2) is dangerous, and (3) would just obfuscate the code. (I know this does not apply to the commit, but should be noted) Yes, I agree; however

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 03:17:35PM -0600, Chris Costello wrote: 2. The C standard dictates that free() does nothing when it gets a NULL argument. Well, it dictates that free(NULL) is safe -- it doesn't dictate that it ``does nothing''. Which brings me to my next comment: The other

Re: Why not another style thread? (was Re: cvs commit:src/lib/libc/gen getgrent.c)

2000-12-17 Thread Chris Costello
On Sunday, December 17, 2000, Jacques A. Vidrine wrote: I don't blame authors of storage allocation code if they do not write free like this: void free(void *p) { if (p == NULL) return; . . . It would be silly to

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 03:36:56PM -0600, Chris Costello wrote: On Sunday, December 17, 2000, Jacques A. Vidrine wrote: It would be silly to optimize for freeing NULL pointers. You mean as seen in: [snip ifree(), which checks for a NULL pointer, first thing] called by free():

Re: Why not another style thread? (was Re: cvs commit:src/lib/libc/gen getgrent.c)

2000-12-17 Thread Chris Costello
On Sunday, December 17, 2000, Jacques A. Vidrine wrote: I may have missed your point ... or maybe you are just agreeing with what I wrote. For this particular implementation of free, you get the following for `free(foo)' when foo == NULL: function call and stack overhead for free()

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Jacques A. Vidrine
On Sun, Dec 17, 2000 at 04:04:42PM -0600, Chris Costello wrote: On Sunday, December 17, 2000, Jacques A. Vidrine wrote: I may have missed your point ... or maybe you are just agreeing with what I wrote. For this particular implementation of free, you get the following for `free(foo)'

Re: Writing Device Drivers

2000-12-17 Thread Sergey Babkin
David Preece wrote: At 13:02 17/12/00 +, you wrote: Does anyone have any good tips to get started / HowTo's, or some simple examples that will give me knowledge like the PC Speaker or something simple like that? This is turning into a FAQ, but don't worry about it. The usual answer

Re: Writing Device Drivers

2000-12-17 Thread Devin Butterfield
David Preece wrote: At 13:02 17/12/00 +, you wrote: Does anyone have any good tips to get started / HowTo's, or some simple examples that will give me knowledge like the PC Speaker or something simple like that? This is turning into a FAQ, but don't worry about it. The usual answer

DOS Emulation KLD

2000-12-17 Thread Jeremiah Gowdy
I've had this idea kicking around for some time, so I decided I would throw it out there and see if anyone was interested or had any ideas. I'm wondering why we can'twrite basic DOS emulation as a KLD. DOS programs are x86 code, a majority of it usually doing basic mundane (userland

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread assar
"Jacques A. Vidrine" [EMAIL PROTECTED] writes: What do folks think about 1)if (data) free(data); versus 2)free(data); versus 3)#define xfree(x) if ((x) != NULL) free(x); xfree(data); (2), unless you can show that you actually win

Re: Writing Device Drivers

2000-12-17 Thread Nat Lanza
Devin Butterfield [EMAIL PROTECTED] writes: This is IMHO one of the advantages linux has over FreeBSD. You can run by your local Barnes Noble bookstore and pick up a copy of "Linux Device Drivers" and start writing code that you actually understand. It's less of an advantage than you might

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Warner Losh
In message [EMAIL PROTECTED] "Jacques A. Vidrine" writes: : What do folks think about : : 1)if (data) : free(data); : : versus : : 2)free(data); : : versus : : 3)#define xfree(x) if ((x) != NULL) free(x); : xfree(data); Number 2. ANSI-C (aka c89)

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Warner Losh
In message [EMAIL PROTECTED] "Jacques A. Vidrine" writes: : I hate to give up a line for : : if (data) : free(data); : : but neither do I care for ``if (data) free(data);''. I guess if I : were writing several statements like that in a single file, I would : consider the

Re: Writing Device Drivers

2000-12-17 Thread Wes Peters
Devin Butterfield wrote: This is IMHO one of the advantages linux has over FreeBSD. You can run by your local Barnes Noble bookstore and pick up a copy of "Linux Device Drivers" and start writing code that you actually understand. And they'll run fine in Linux 2.0.43pre11 or something like

Re: kernel type

2000-12-17 Thread Wes Peters
Bill Fumerola wrote: On Sat, Dec 16, 2000 at 06:37:56PM -0800, Jordan Hubbard wrote: It's hardly arbitrary, though the jury's still out as to whether it's misguided or not. You may remember that Apple bought a little company called NeXT a few years back. Well, that company's people had

Re: kernel type

2000-12-17 Thread Wes Peters
Jordan Hubbard wrote: Yeah, but in what sense is that use of Mach a serious microkernel, if it's only got one server: BSD? I've never understood the point of that sort of use. It makes sense for a QNX or GNU/Hurd or minix or Amoeba style of architecture, but how does Mach help

Re: Writing Device Drivers

2000-12-17 Thread Wes Peters
Sergey Babkin wrote: David Preece wrote: At 13:02 17/12/00 +, you wrote: Does anyone have any good tips to get started / HowTo's, or some simple examples that will give me knowledge like the PC Speaker or something simple like that? This is turning into a FAQ, but don't

Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c)

2000-12-17 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Warner Losh writes: Number 2. ANSI-C (aka c89) requires that free(NULL) work. We shouldn't go out of our way to pander to those machines where it doesn't. The reason why this is so is that it is legal for realloc(ptr, 0): to return either a NULL pointer