• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing from the kernel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing from the kernel


  • Subject: Re: Writing from the kernel
  • From: Terry Lambert <email@hidden>
  • Date: Tue, 20 Nov 2007 15:01:41 -0800

Of course, that's supposed to be "prototype parameters either", but my iPhone ate my homework. 8^).

-- Terry

On Nov 20, 2007, at 2:58 PM, Terry Lambert <email@hidden> wrote:

Actually both UNIX/POSIX and ANSI/ISO C standards require that prototypeseither be omitted or in the implementation name space -- have underscore prefixes so if a user e.g. does:

   #define path "mypath"

and then #includes a system header to get e.g.:

   Int open(const char *path, int flags, ...);

In scope, path in the parameter list doesn't change into something else that's syntactically incorrect (or worse, syntactically correct but wrong).

Unfortunately, there's user code out there that puts variables and definitions into that space anyway, so we just try to avoid it all.

-- Terry

On Nov 20, 2007, at 8:01 AM, Quinn <email@hidden> wrote:

At 9:54 -0600 20/11/07, Kynan Shook wrote:
Now, is there any documentation on these interfaces? A google on vnode_open returns very few results...

Not really )-: [1] And given the BSD habit of not including formal parameter names in prototypes [2], your only real option is to look at the Darwin source.


S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/ >
Apple Developer Relations, Developer Technical Support, Core OS/ Hardware


[1] The bug tracking this is <rdar://problem/3524590>.

[2] Alas, there are fairly good technical reasons for this.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Writing from the kernel (From: Kynan Shook <email@hidden>)
 >Re: Writing from the kernel (From: Quinn <email@hidden>)
 >Re: Writing from the kernel (From: Kynan Shook <email@hidden>)
 >Re: Writing from the kernel (From: Quinn <email@hidden>)
 >Re: Writing from the kernel (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: Writing from the kernel
  • Next by Date: Re: MTRRs and PATs
  • Previous by thread: Re: Writing from the kernel
  • Next by thread: Re: Writing from the kernel
  • Index(es):
    • Date
    • Thread