lkml.org 
[lkml]   [1997]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Acceptable kernel code?
Date
Followup to:  <199705051815.NAA02230@chaos.coredcs.com>
By author: "James R. Leu" <jleu@chaos.coredcs.com>
In newsgroup: linux.dev.kernel

> Is it acceptable to use functions like gethostbyname() inside of the kernel?

ABSOLUTELY NOT.

> Normally a userland function call should stay in userland, right?
> Well what about in a thread like nfsiod? It is kind of in userland
> (it's a process) and kind of in kernel land.

Not so, it is a process in kernel mode. It is 100% kernel code.

> What is the general rule of thumb for this?

Not a rule of thumb, a commandment: DON'T EVEN TRY. This is part of
the reason why autofs is implemented partially in the kernel and
partially in user space, so the user space daemon can take care of
this kind of business whereas the kernel code is there for speed.

-hpa
--
Always looking for a few good BOsFH. ** Linux - the OS of global cooperation
I am Baha'i -- ask me about it or see http://www.bahai.org/

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