[haiku-development] Re: undertanding syscall

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 01 Dec 2008 11:50:10 +0100 CET

romain.haiku@xxxxxxxxxxx wrote:
> Btw why does the code in the kernel is prefixed "_user", and the code 
> in
> user is prefixed "_kernel" ?

It's "_user" and "_kern". This has been done to be able to share lib 
code between the kernel and userland for POSIX functions like open(), 
stat(), ... - they always call _kern_*() functions which resolve to a 
syscall from userland (to call the kernel), and a direct call in the 
kernel itself, see for example the _kern_*() functions in src/system/
kernel/fs/vfs.cpp.

The "_" is because it's in the private system namespace.

Bye,
   Axel.


Other related posts: