Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2007-07-19 09:37:44


Thanks!

Ralph got it this morning in https://svn.open-mpi.org/trac/ompi/
changeset/15501.

On Jul 19, 2007, at 5:34 AM, Bert Wesarg wrote:

> Hello,
>
>> Author: brbarret
>> Date: 2007-07-18 16:23:45 EDT (Wed, 18 Jul 2007)
>> New Revision: 15492
>> URL: https://svn.open-mpi.org/trac/ompi/changeset/15492
>>
>> Log:
>> add ability to have thread-specific data on windows, pthreads,
>> solaris
>> threads,
>> and non-threaded builds
>>
>> +int
>> +opal_tsd_key_create(opal_tsd_key_t *key,
>> + opal_tsd_destructor_t destructor)
>> +{
>> + int i;
>> +
>> + if (!atexit_registered) {
>> + atexit_registered = true;
>> + if (0 != atexit(run_destructors)) {
>> + return OPAL_ERR_TEMP_OUT_OF_RESOURCE;
>> + }
>> + }
>> +
>> + for (i = 0 ; i < TSD_ENTRIES ; ++i) {
>> + if (entries[i].used == false) {
>> + entries[i].used = true;
>> + entries[i].value = NULL;
>> + entries[i].destructor = destructor;
>> + *key = i;
> break;
>> + }
>> + }
>> + if (i == TSD_ENTRIES) return ENOMEM;
>> +
>> + return OPAL_SUCCESS;
>> +}
>
> Bert
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
Cisco Systems