Re: Function calls not permitted in kernel code

2000-09-20 Thread Peter Samuelson
[Mark James <[EMAIL PROTECTED]>] > In summary: > > - Kernel code can't or shouldn't do anything too high-level. In general, yes. This is why the winmodem driver people (last I heard) are trying to pull some of the modem functions out into userspace programs. Sync and cancellation algorithms f

Re: Function calls not permitted in kernel code

2000-09-20 Thread Mark James
Thank you Tigran and Peter for your replies. In summary: - Kernel code can't or shouldn't do anything too high-level. Emulating high-level things through calls to other parts of the kernel is not likely to be portable across versions. - A subset of libc functions is in the linux/lib directo

Re: Function calls not permitted in kernel code

2000-09-20 Thread Peter Samuelson
[Mark James] > That is, can a kernel module open and read files or sockets, call > libc functions, start processes? * Read files/sockets: you need a process context. That means if you are running in an interrupt you are SOL and if you are in an existing process context, the context owner mig

Re: Function calls not permitted in kernel code

2000-09-20 Thread Tigran Aivazian
On Wed, 20 Sep 2000, Mark James wrote: > That is, can a kernel module open and read files or sockets, > call libc functions, start processes? kernel code is, as userspace one, just a code to be executed by the CPU, I suspect you knew that already ;) Therefore, it can do absolutely anything the h

Function calls not permitted in kernel code

2000-09-20 Thread Mark James
Hi, couldn't find an answer to this in any FAQ: Can anyone point me to a clear summary of what can and what can't be called by kernel code. That is, can a kernel module open and read files or sockets, call libc functions, start processes? If, as I suspect, none of these are possible, are the op