Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Brian Barrett (bbarrett_at_[hidden])
Date: 2007-07-19 10:27:50


Sigh. Thanks. Should probably have tested that code ;). And the
solaris code. and the windows code.

Brian

On Jul 19, 2007, at 7:37 AM, Jeff Squyres wrote:

> 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
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel