DB_THREAD_UNLOCK(dbp);
CURSOR_TEARDOWN(dbp);
__ram_c_iclose(dbp, dbc)	DB *dbp;	DBC *dbc;{	/*	 * All cursors are queued from the master DB structure.  For	 * now, discard the DB handle which triggered this call, and	 * replace it with the cursor's reference.	 */	dbp = dbc->dbp;	/* Remove the cursor from the queue. */	DB_THREAD_LOCK(dbp);	TAILQ_REMOVE(&dbp->curs_queue, dbc, links);	DB_THREAD_UNLOCK(dbp);	/* Discard the structures. */	FREE(dbc->internal, sizeof(RCURSOR));	FREE(dbc, sizeof(DBC));	return (0);}