}
/* Add an element into the freelist. Merge adjacent records if
- neccessary. */
+ necessary. */
int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct tdb_record *rec)
{
/* Allocation and tailer lock */
* function. The parsing function is executed under the chain read lock, so it
* should be fast and should not block on other syscalls.
*
- * DONT CALL OTHER TDB CALLS FROM THE PARSER, THIS MIGHT LEAD TO SEGFAULTS.
+ * DON'T CALL OTHER TDB CALLS FROM THE PARSER, THIS MIGHT LEAD TO SEGFAULTS.
*
* For mmapped tdb's that do not have a transaction open it points the parsing
* function directly at the mmap area, it avoids the malloc/memcpy in this
/* Lock each chain from the start one. */
for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
if (!tlock->off && tlock->hash != 0) {
- /* this is an optimisation for the common case where
+ /* this is an optimization for the common case where
the hash chain is empty, which is particularly
common for the use of tdb with ldb, where large
hashes are used. In that case we spend most of our
lock, so instead we get the lock and re-fetch the
value below.
- Notice that not doing this optimisation on the
+ Notice that not doing this optimization on the
first hash chain is critical. We must guarantee
that we have done at least one fcntl lock at the
start of a search to guarantee that memory is