RE: static initialization of pthread_rwlock_t?
RE: static initialization of pthread_rwlock_t?
- Subject: RE: static initialization of pthread_rwlock_t?
- From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>
- Date: Mon, 8 Jun 2009 15:25:29 -0400
- Thread-topic: static initialization of pthread_rwlock_t?
I wish it were... this code is going to be run under Windows (via a compliant third-party library) as well as OS X. We use Visual Studio under Windows...
Thanks,
Cem Karan
> -----Original Message-----
> From: Jean-Daniel Dupas [mailto:email@hidden]
> Sent: Monday, June 08, 2009 11:44 AM
> To: Karan, Cem (Civ, ARL/CISD)
> Cc: email@hidden
> Subject: Re: static initialization of pthread_rwlock_t?
>
> Is GCC constructor attribute compliant enough for your need ?
>
> __attribute__((constructor)) static void __Initializer(void) {
> pthread_rwlock_init(&myStatisLock);
> }
>
> http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
> «The constructor attribute causes the function to be
> called automatically before execution enters main ()»
>
> Le 8 juin 09 à 15:31, Karan, Cem (Civ, ARL/CISD) a écrit :
>
> > I know I can statically initialize a pthread_mutex_t via
> > PTHREAD_MUTEX_INITIALIZER; is there a similar macro/method for
> > pthread_rwlock_t instances? Note that I need a POSIX compliant
> > method, so special Darwin-only methods are out.
> >
> > Thanks,
> > Cem Karan
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Darwin-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > .org
> >
> > This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden