Re: Kernel 2.x POSIX Compliance/Conformance...

From: J.A. Magallon
Date: Wed Feb 04 2004 - 16:10:34 EST



On 2004.02.04, "Randazzo, Michael" wrote:
> Where are the kernel calls defined for locks and semaphores?
>
> How come the kernel headers don't define Posix.4
> semaphores (_POSIX_SEMAPHROES) or Posix itself
> (_POSIX_VERSION is undefined)
>

The kernel internals are not nor Posix, nor SysV nor anything. It is just
by chance (or logic ;)) that some functions in kernel are named like the
userspace similars. Kernel source is in its own namespace.

One example (not a syscall, but useful I expect):
- Kernel has a 'sys_clone()' function, numbered __NR_clone
- GLibc implements a linux-specific system-call 'clone()', using sys_clone
- Glibc uses 'clone()' to implement 'fork()'

So, don't try to look for fork() inside the kernel.

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrake Linux release 10.0 (Cooker) for i586
Linux 2.6.2-rc3-jam1 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-4mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/