Frank, i think u partly answered my question ... BUT i dont think i can create a thread of a userland process from kernelmode (correct me if i am wrong )... what i want to do here is create a userland thread from kernel mode that just executes a userland function supplied by the parent process & exits ... i know this can be done in user land easily but if i want to do in kernel what all i need to hack. rgds tikare ----- Original Message ----- From: "Frank Schaefer" <frank.schafer@setuza.cz> To: < kernelnewbies@nl.linux.org> Sent: Wednesday, March 27, 2002 3:28 AM Subject: Re: userland shared events & callbacks > Hi, > > I don't know what Javier wrote ( he probably replied direct to You ) and > it's still not absolutely clear to me, what You try to do, bu not at > all: > > I'd sugest You to use a semaphore for the kernel <--> userspace > communication. The kernel space could set the semaphore you wait in > userspace for. > If the semaphore gets set, create your thread ( in userland ). > If you want to create a process in kernel space ... > ... I think ( after a very quick RTFM ) clone is the syscall most near > to your intent; sys_clone from kernel space of course. > > For a better picture, read some SysV IPC docs, man 2 clone, man 2 > sem{ctl,get,op} and the kernel source of course ;o). > > Hope this meets your post, and happy hacking > Frank > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/