Changeset 72d2ec4d in rtems for cpukit/libblock


Ignore:
Timestamp:
07/03/08 01:37:38 (16 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
6a58ad7
Parents:
b9c38ed
Message:

2008-07-03 Chris Johns <chrisj@…>

  • cpukit/libcsupport/include/chain.h: Removed. Use the SAPI interface that is supported.
  • cpukit/libcsupport/Makefile.am, cpukit/libcsupport/preinstall.am: Remove chain.h header references.
  • cpukit/sapi/include/rtems/chain.h, cpukit/sapi/inline/rtems/chain.inl: New. A supported chains interface.
  • cpukit/sapi/Makefile.am, cpukit/sapi/preinstall.am: Updated to include the new chains interface.
  • cpukit/libfs/src/imfs/imfs.h, cpukit/libfs/src/imfs/imfs_creat.c, cpukit/libfs/src/imfs/imfs_debug.c, cpukit/libfs/src/imfs/imfs_directory.c, cpukit/libfs/src/imfs/imfs_fsunmount.c, cpukit/libfs/src/imfs/imfs_getchild.c, cpukit/libfs/src/imfs/imfs_load_tar.c, cpukit/libfs/src/imfs/imfs_rmnod.c, cpukit/libfs/src/imfs/memfile.c, cpukit/libfs/src/nfsclient/src/nfs.c, cpukit/libcsupport/include/rtems/libio.h, cpukit/libcsupport/src/malloc_deferred.c, cpukit/libcsupport/src/mount.c, cpukit/libcsupport/src/privateenv.c, cpukit/libcsupport/src/unmount.c: Change to the new chains interface.
  • cpukit/libcsupport/src/malloc_boundary.c: Remove warning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    rb9c38ed r72d2ec4d  
    688688    p->tree = NULL;
    689689
    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);
    692692
    693693    /* Allocate memory for buffer descriptors */
     
    721721        b->use_count = 0;
    722722        b->pool = pool;
    723         _Chain_Append(&p->free, &b->link);
     723        rtems_chain_append(&p->free, &b->link);
    724724    }
    725725
     
    796796    }
    797797
    798     Chain_Initialize_empty(&rtems_bdbuf_ctx.mod);
     798    rtems_chain_initialize_empty(&rtems_bdbuf_ctx.mod);
    799799
    800800    /* Initialize buffer pools and roll out if something failed */
     
    928928    {
    929929        /* 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);
    933933            if (bd_buf != NULL)
    934934            {
     
    944944        else
    945945        {
    946             bd_buf = (bdbuf_buffer *)Chain_Get(&(bd_pool->free));
     946            bd_buf = (bdbuf_buffer *)rtems_chain_get(&(bd_pool->free));
    947947        }
    948948
     
    10101010            /* Buffer descriptor is linked to the lru or mod chain. Remove
    10111011               it from there. */
    1012             Chain_Extract(&bd_buf->link);
     1012            rtems_chain_extract(&bd_buf->link);
    10131013        }
    10141014        bd_buf->use_count++;
     
    14541454            /* Buffer was modified. Insert buffer to the modified buffers
    14551455             * 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);
    14571457
    14581458            /* Release the flush_sema */
     
    14631463            /* Buffer was not modified. Add this descriptor to the
    14641464             * 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);
    14661466            rc = rtems_semaphore_release(bd_pool->bufget_sema);
    14671467        }
     
    16911691                                        0);
    16921692            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);
    16941694          if (nxt_bd_buf != NULL) {
    16951695                nxt_bd_buf->in_progress = TRUE;
     
    17851785              if (bd_buf->modified)
    17861786                {
    1787                   Chain_Append(&rtems_bdbuf_ctx.mod, &bd_buf->link);
     1787                  rtems_chain_append(&rtems_bdbuf_ctx.mod, &bd_buf->link);
    17881788                  rc = rtems_semaphore_release(rtems_bdbuf_ctx.flush_sema);
    17891789                }
    17901790              else
    17911791                {
    1792                   Chain_Append(&bd_pool->lru, &bd_buf->link);
     1792                  rtems_chain_append(&bd_pool->lru, &bd_buf->link);
    17931793                  rc = rtems_semaphore_release(bd_pool->bufget_sema);
    17941794                }
Note: See TracChangeset for help on using the changeset viewer.