-----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:
@shadowlab
.org
This email sent to email@hidden