bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #18217] glibc: `__libc_once'


From: olafBuddenhagen
Subject: Re: [bug #18217] glibc: `__libc_once'
Date: Sun, 10 Dec 2006 19:05:41 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi,

On Tue, Nov 21, 2006 at 09:17:23PM -0800, Roland McGrath wrote:

> Uli abused the macros.  To support the use he wants, __libc_once
> should be revamped in all its implementations to return a value or
> have a variant that does (value says whether fn just ran).

I looked into this, but not being familiar with glibc conventions, I
have many doubts:
- By "return a value", you mean passing another parameter with a
  variable to assign the return value?
- If so, pass the variable directly, or rather as a pointer (like for a
  "real" function)?
- Better use a different macro for the version with return value, or
  only have one, and pass NULL or so if no return value is used?
- How about using an inline function instead of a macro?

-antrik-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]