Changeset 72d2ec4d in rtems for cpukit/libblock
- Timestamp:
- 07/03/08 01:37:38 (16 years ago)
- Branches:
- 4.10, 4.11, 4.9, 5, master
- Children:
- 6a58ad7
- Parents:
- b9c38ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libblock/src/bdbuf.c
rb9c38ed r72d2ec4d 688 688 p->tree = NULL; 689 689 690 Chain_Initialize_empty(&p->free);691 Chain_Initialize_empty(&p->lru);690 rtems_chain_initialize_empty(&p->free); 691 rtems_chain_initialize_empty(&p->lru); 692 692 693 693 /* Allocate memory for buffer descriptors */ … … 721 721 b->use_count = 0; 722 722 b->pool = pool; 723 _Chain_Append(&p->free, &b->link);723 rtems_chain_append(&p->free, &b->link); 724 724 } 725 725 … … 796 796 } 797 797 798 Chain_Initialize_empty(&rtems_bdbuf_ctx.mod);798 rtems_chain_initialize_empty(&rtems_bdbuf_ctx.mod); 799 799 800 800 /* Initialize buffer pools and roll out if something failed */ … … 928 928 { 929 929 /* Assign new buffer descriptor */ 930 if ( _Chain_Is_empty(&bd_pool->free))931 { 932 bd_buf = (bdbuf_buffer *) Chain_Get(&bd_pool->lru);930 if (rtems_chain_is_empty(&bd_pool->free)) 931 { 932 bd_buf = (bdbuf_buffer *)rtems_chain_get(&bd_pool->lru); 933 933 if (bd_buf != NULL) 934 934 { … … 944 944 else 945 945 { 946 bd_buf = (bdbuf_buffer *) Chain_Get(&(bd_pool->free));946 bd_buf = (bdbuf_buffer *)rtems_chain_get(&(bd_pool->free)); 947 947 } 948 948 … … 1010 1010 /* Buffer descriptor is linked to the lru or mod chain. Remove 1011 1011 it from there. */ 1012 Chain_Extract(&bd_buf->link);1012 rtems_chain_extract(&bd_buf->link); 1013 1013 } 1014 1014 bd_buf->use_count++; … … 1454 1454 /* Buffer was modified. Insert buffer to the modified buffers 1455 1455 * list and initiate flushing. */ 1456 Chain_Append(&rtems_bdbuf_ctx.mod, &bd_buf->link);1456 rtems_chain_append(&rtems_bdbuf_ctx.mod, &bd_buf->link); 1457 1457 1458 1458 /* Release the flush_sema */ … … 1463 1463 /* Buffer was not modified. Add this descriptor to the 1464 1464 * end of lru chain and make it available for reuse. */ 1465 Chain_Append(&bd_pool->lru, &bd_buf->link);1465 rtems_chain_append(&bd_pool->lru, &bd_buf->link); 1466 1466 rc = rtems_semaphore_release(bd_pool->bufget_sema); 1467 1467 } … … 1691 1691 0); 1692 1692 if (rc == RTEMS_SUCCESSFUL) { 1693 nxt_bd_buf = (bdbuf_buffer *) Chain_Get(&rtems_bdbuf_ctx.mod);1693 nxt_bd_buf = (bdbuf_buffer *)rtems_chain_get(&rtems_bdbuf_ctx.mod); 1694 1694 if (nxt_bd_buf != NULL) { 1695 1695 nxt_bd_buf->in_progress = TRUE; … … 1785 1785 if (bd_buf->modified) 1786 1786 { 1787 Chain_Append(&rtems_bdbuf_ctx.mod, &bd_buf->link);1787 rtems_chain_append(&rtems_bdbuf_ctx.mod, &bd_buf->link); 1788 1788 rc = rtems_semaphore_release(rtems_bdbuf_ctx.flush_sema); 1789 1789 } 1790 1790 else 1791 1791 { 1792 Chain_Append(&bd_pool->lru, &bd_buf->link);1792 rtems_chain_append(&bd_pool->lru, &bd_buf->link); 1793 1793 rc = rtems_semaphore_release(bd_pool->bufget_sema); 1794 1794 }
Note: See TracChangeset
for help on using the changeset viewer.