lkml.org 
[lkml]   [2001]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PThreads in kernel module & network interface

On Wed, 4 Apr 2001, Remko van der Vossen wrote:
> second problem is that when I use the PThread functions from this module I
> need the pthread library. As you probably know gcc doesn't link the pthread
> library into the module, so I tried to do that with ld, that in itself
> worked, I successfully linked the pthread library into the module I made,

The first problem you are running into is mixing user space with kernel
code. You cannot use pthreads in the kernel... not directly anyways. You
could use kernel_thread() instead.

If your future stack will have a BSD socket interface you could prototype
your server in user space - and use pthreads. If you don't want the
interface then you can hook into the stack directly by using the sock_*
functions (see include/linux/net.h). You will probably get everything you
need to start you off from an article by Alessandro Rubini at the Linux
Magazine: http://www.linux-mag.com/2000-12/gear_01.html

> Thank you in advance,

Cheers,
Bart.

--
WebSig: http://www.jukie.net/~bart/sig/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.040 / U:1.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site