Ignore:
Timestamp:
Jan 13, 2021, 12:36:17 AM (3 years ago)
Author:
alain
Message:

All modifications required to support the <tcp_chat> application
including error recovery in case of packet loss.A

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/pipe.c

    r669 r683  
    22 * pipe.c - single writer, single reader pipe implementation           
    33 *
    4  * Author     Alain Greiner (2016,2017,2018,2019,2020)
     4 * Author     Alain Greiner     (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3232                      uint32_t size )
    3333{
    34     kmem_req_t     req;
    3534    remote_buf_t * buf;
    3635    pipe_t       * pipe;
     
    5554
    5655    // 3. allocate memory for pipe descriptor
    57     req.type  = KMEM_KCM;
    58     req.order = bits_log2( sizeof(pipe_t) );
    59     req.flags = AF_ZERO;
    60     pipe = kmem_remote_alloc( cxy , &req );
     56    pipe = kmem_remote_alloc( cxy , bits_log2(sizeof(pipe_t)) , AF_ZERO );
    6157
    6258    if( pipe == NULL )
     
    7672void pipe_destroy( xptr_t pipe_xp )
    7773{
    78     kmem_req_t req;
    79 
    8074    pipe_t * pipe_ptr = GET_PTR( pipe_xp );
    8175    cxy_t    pipe_cxy = GET_CXY( pipe_xp );
     
    8882
    8983    // release pipe descriptor
    90     req.type = KMEM_KCM;
    91     req.ptr  = pipe_ptr;
    92     kmem_remote_free( pipe_cxy , &req );
     84    kmem_remote_free( pipe_cxy , pipe_ptr , bits_log2(sizeof(pipe_t)) );
    9385
    9486}  // end pipe_destroy()
    95 
    9687
    9788//////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.