Re: static initialization of pthread_rwlock_t?
Re: static initialization of pthread_rwlock_t?
- Subject: Re: static initialization of pthread_rwlock_t?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Mon, 8 Jun 2009 17:44:01 +0200
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:
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