Hallvard B Furuseth wrote:
> [EMAIL PROTECTED] writes:
>>      operation.c  1.81 -> 1.82
>> rename ldap_pvt_thread_pool_setkey_x() to
>> ldap_pvt_thread_pool_setkey() (as part of ITS#5309)
> 
> One nitpick - in this code in operation.c:
> 
>>        ldap_pvt_thread_pool_getkey( ctx, (void *)slap_op_free, &otmp, NULL );
>>        op2 = otmp;
>>        LDAP_STAILQ_NEXT( op, o_next ) = op2;
>>        ldap_pvt_thread_pool_setkey( ctx, (void *)slap_op_free,
>>            (void *)op, slap_op_q_destroy, NULL, NULL );
> 
> can it be a problem if 'op' is stored to the context before its o_next
> gets updated?

It shouldn't be a problem, since by definition only one thread at a time
can be calling it with that ctx.

> If not, we can save a getkey call - move the setkey up
> instead.  I _think_ it's all right since only the current thread should
> be accessing the key (except during pauses), and the pool can't pause
> here.

ditto.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   [EMAIL PROTECTED]
---------------------------------------


Reply via email to