I have a couple of questions about the linux-kernel.
My first one is related to kernel-threads.
Can I create a kernel-thread from a user-level program? I tried to create
a system calll which makes a call to the function to the
kernel_thread(thrad_function, flags), but it does not seem to work
correctly (see next wuestion). Is this a correct approach? My other
question related to kernel threads is if I have to use lock_kernel and
unlock_kernel before and after a call to kernel_thread().
The reason I am creating this thread is because I need a network service
inside the kernel. My idea was to use the kernel thread for receiving
messages from other remote nodes (by blocking on a receive). So for the
network code I tried to use the sys_socket, sys_bind and sys_receivefrom
calls. This approach works correctly if I initiate the thread during the
kernel's intialization, but if I initiate the thread through a system call
the system craches.
The reason for the crash seems to be the call to the move_addr_to_user
function (in the sys_bind) system call. I tried to re-implement the
sys_bind function by duplicating everything except the call to
move_addr_to_kernel. In this case the system did not crash, but the thread
does not receive anything after blocking. -- Athanasios Papathanasiou -
firstname.lastname@example.org Graduate Student, Computer Science Dept.
University of Rochester
Thank you in advance,
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:16 EST