Advanced Programming in the UNIX® Environment
ptg10805159 Section 20.8 Source Code 767 348 /* 349 * Now read the actual index record. We read it into the key 350 * buffer tha ...
ptg10805159 768 ADatabase Library Chapter 20 377 /* 378 * Read the current data record into the data buffer. 379 * Return a poin ...
ptg10805159 Section 20.8 Source Code 769 412 /* 413 * Delete the current record specified by the DB structure. 414 * This functi ...
ptg10805159 770 ADatabase Library Chapter 20 441 /* 442 * Read the free list pointer. Its value becomes the 443 * chain ptr fiel ...
ptg10805159 Section 20.8 Source Code 771 472 /* 473 * Write a data record. Called by _db_dodelete (to write 474 * the record wit ...
ptg10805159 772 ADatabase Library Chapter 20 502 /* 503 * Write an index record. _db_writedat is called before 504 * this functi ...
ptg10805159 Section 20.8 Source Code 773 532 /* 533 * Position the index file and record the offset. 534 */ 535 if ((db->idxo ...
ptg10805159 774 ADatabase Library Chapter 20 564 /* 565 * Store a record in the database. Return 0 if OK, 1 if record 566 * exis ...
ptg10805159 Section 20.8 Source Code 775 597 /* 598 * _db_find_and_lock locked the hash chain for us; read 599 * the chain ptr t ...
ptg10805159 776 ADatabase Library Chapter 20 626 } else { /* record found */ 627 if (flag == DB_INSERT) { 628 rc =1;/*error, rec ...
ptg10805159 Section 20.8 Source Code 777 655 /* 656 * Same size data, just replace data record. 657 */ 658 _db_writedat(db, data ...
ptg10805159 778 ADatabase Library Chapter 20 687 while (offset != 0) { 688 nextoffset=_db_readidx(db, offset); 689 if (strlen(db ...
ptg10805159 Section 20.8 Source Code 779 720 /* 721 * Rewind the index file for db_nextrec. 722 * Automatically called by db_ope ...
ptg10805159 780 ADatabase Library Chapter 20 751 /* 752 * We read lock the free list so that we don’t read 753 *arecord in the m ...
ptg10805159 Section 20.9 Performance 781 The normal use ofdb_rewindanddb_nextrecis in a loop of the form db_rewind(db); while (( ...
ptg10805159 782 ADatabase Library Chapter 20 Writenrecrecords to the database. Read thenrecrecords back by key value. Perform t ...
ptg10805159 Section 20.9 Performance 783 mandatory locking), we ran three versions of the test program. The first version used t ...
ptg10805159 784 ADatabase Library Chapter 20 The next test was to try the no-locking program with multiple children. Theresults, ...
ptg10805159 Section 20.9 Performance 785 grained locking to fine-grained locking. On the system used for these tests, coarse- gr ...
ptg10805159 786 ADatabase Library Chapter 20 Figure20.9 is a graph of the data from Figure20.8 for advisory fine-grained locking ...
«
36
37
38
39
40
41
42
43
44
45
»
Free download pdf