Hello, there is kind of potential deadlock inside the function, but actually the function is not in use. I think it remained there from some initial coding when it was planned to be able to load new tables at run-time. That feature is not in place, so the function is not called by another function as of now. I have fixed and then commented the declaration and implementation of the function.
Thanks for the report, cheers, Daniel On 05/21/07 11:13, yanlin wrote: > hi, all, > > in function dbt_db_del_table() of module dbtext, should we do > "lock_release(&_tbc->sem)" before "break" when > we found the cached table for delete? in tbl_cache_free(), > "lock_get(&_tbc->sem)" would be called, deadlock then. > > int dbt_db_del_table(dbt_cache_p _dc, str *_s) > { > ... > while(_tbc) > { > ... > lock_get(&_tbc->sem); > if(_tbc->dtp->name.len == _s->len > && !strncasecmp(_tbc->dtp->name.s, _s->s, > _s->len)) > { > ... > > //============> need 'lock_release(&_tbc->sem)' > before break ? > break; > } > lock_release(&_tbc->sem); > ... > } > ... > tbl_cache_free(_tbc); > ... > > } > > > regards, > > yan lin > 05/21/2007 > > > *** Disclaimer: This message may contain privileged and/or confidential > information. If you have received this e-mail in error or are not the > intended recipient, you may not use, copy, disseminate or distribute it; do > not open any attachments, delete it immediately from your system and notify > the sender promptly by e-mail that you have done so. Thank you. *** > > > _______________________________________________ > Devel mailing list > Devel@openser.org > http://openser.org/cgi-bin/mailman/listinfo/devel > > _______________________________________________ Devel mailing list Devel@openser.org http://openser.org/cgi-bin/mailman/listinfo/devel