public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Kernel 2.x POSIX Compliance/Conformance...
@ 2004-02-04 20:18 Randazzo, Michael
  2004-02-04 20:21 ` Valdis.Kletnieks
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Randazzo, Michael @ 2004-02-04 20:18 UTC (permalink / raw)
  To: 'Valdis.Kletnieks@vt.edu', Randazzo, Michael
  Cc: 'linux-kernel@vger.kernel.org'

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)

M.

-----Original Message-----
From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu]
Sent: Wednesday, February 04, 2004 2:59 PM
To: Randazzo, Michael
Cc: 'linux-kernel@vger.kernel.org'
Subject: Re: Kernel 2.x POSIX Compliance/Conformance... 


On Wed, 04 Feb 2004 14:44:00 EST, "Randazzo, Michael" said:
> I was using at sem_close(), sem_destroy90, sem_open() ...
> 
> according to Posix.4, these are defined in semaphore.h - but
> are not defined in /lib/modules/<uname -r>/build/include/semaphore.h
> 
> Are Posix.4 calls only for userspace?

System calls in general are for userspace.  Often, there exist alternate
entry points for kernel services, or other ways to do it (for instance,
the kernel has its own code for locks and semaphores).
 
"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."


^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Kernel 2.x POSIX Compliance/Conformance...
@ 2004-02-04 20:22 Randazzo, Michael
  2004-02-04 21:39 ` Richard B. Johnson
  0 siblings, 1 reply; 10+ messages in thread
From: Randazzo, Michael @ 2004-02-04 20:22 UTC (permalink / raw)
  To: 'Valdis.Kletnieks@vt.edu', Randazzo, Michael
  Cc: 'linux-kernel@vger.kernel.org'

ok...I think I get it....

I can't use any of the posix functions in 
device drivers (modules).....is this correct?

M.

-----Original Message-----
From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu]
Sent: Wednesday, February 04, 2004 3:21 PM
To: Randazzo, Michael
Cc: 'linux-kernel@vger.kernel.org'
Subject: Re: Kernel 2.x POSIX Compliance/Conformance... 


On Wed, 04 Feb 2004 15:18:17 EST, "Randazzo, Michael" said:
> 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)

Posix.4 and _POSIX_VERSION are for *userspace*

The kernel isn't userspace.
 
"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."


^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Kernel 2.x POSIX Compliance/Conformance...
@ 2004-02-04 19:44 Randazzo, Michael
  2004-02-04 19:58 ` Valdis.Kletnieks
  0 siblings, 1 reply; 10+ messages in thread
From: Randazzo, Michael @ 2004-02-04 19:44 UTC (permalink / raw)
  To: 'Valdis.Kletnieks@vt.edu', Randazzo, Michael
  Cc: 'linux-kernel@vger.kernel.org'

I was using at sem_close(), sem_destroy90, sem_open() ...

according to Posix.4, these are defined in semaphore.h - but
are not defined in /lib/modules/<uname -r>/build/include/semaphore.h

Are Posix.4 calls only for userspace?

M.

-----Original Message-----
From: Valdis.Kletnieks@vt.edu [mailto:Valdis.Kletnieks@vt.edu]
Sent: Wednesday, February 04, 2004 2:41 PM
To: Randazzo, Michael
Cc: 'linux-kernel@vger.kernel.org'
Subject: Re: Kernel 2.x POSIX Compliance/Conformance... 


On Wed, 04 Feb 2004 14:30:39 EST, "Randazzo, Michael" <RANDAZZO@ddc-web.com>
said:

> I have made attempts to use (Posix semaphores) in my LKM, but find 
> no POSIX support in /lib/modules/<uname -r>/build/include/unistd.h

Attempting to use syscalls intended for userspace while inside the kernel
is generally regarded as Bad Juju.

'man semctl' says:

     Under  Linux,  the  function semctl is not a system call, but is imple-
       mented via the system call ipc(2).

#define __NR_ipc                117

is what you weren't finding in unistd.h
 
"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Kernel 2.x POSIX Compliance/Conformance...
@ 2004-02-04 19:30 Randazzo, Michael
  2004-02-04 19:40 ` Valdis.Kletnieks
  0 siblings, 1 reply; 10+ messages in thread
From: Randazzo, Michael @ 2004-02-04 19:30 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'

All,

Can someone inform me of the POSIX compliance/Conformance of the Linux 
Kernel, esp. for module (driver) development.

Posix.1 (1003.1)
Posix.4 (1003.1b)
etc....

I have made attempts to use (Posix semaphores) in my LKM, but find 
no POSIX support in /lib/modules/<uname -r>/build/include/unistd.h

Any help is appreciated...

M.
 
"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-02-04 21:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-04 20:18 Kernel 2.x POSIX Compliance/Conformance Randazzo, Michael
2004-02-04 20:21 ` Valdis.Kletnieks
2004-02-04 20:51 ` Torrey Hoffman
2004-02-04 21:02 ` J.A. Magallon
  -- strict thread matches above, loose matches on Subject: below --
2004-02-04 20:22 Randazzo, Michael
2004-02-04 21:39 ` Richard B. Johnson
2004-02-04 19:44 Randazzo, Michael
2004-02-04 19:58 ` Valdis.Kletnieks
2004-02-04 19:30 Randazzo, Michael
2004-02-04 19:40 ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox