Changes between Version 17 and Version 18 of library_mwmr


Ignore:
Timestamp:
Oct 30, 2015, 10:19:53 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_mwmr

    v17 v18  
    2727 
    2828The '''nb_mwmr_read()''' and '''nb_mwmr_write()''' non blocking functions can be used to implement various higher level communication protocols.
    29 
    30 Besides the MWMR channels, the MWMR library provide  another - optional - service: The '''mwmr_bufio_t''' buffer (and the associated access functions) can be used to implement a private input or output buffer,  and move data to or from a shared MWMR communication channel.  This buffer can be declared as a local variable in the stack of the reader/writer thread, and simplifies the access to the MWMR channel when the transfered data have a non fixed format, and must be analysed or produced byte per byte: an input buffer is automatically refill when it becomes empty; an output buffer is automatically flushed when it becomes full
    3129
    3230
     
    7472It takes the lock for exclusive access before testing the channel state. If there is not enough data in the channel, it transfer as many items as possible, releases the lock, and returns the number of actually transfered items (it can be 0).
    7573
     74
     75Besides the MWMR channels, the MWMR library provide  another - optional - service: The '''mwmr_bufio_t''' buffer (and the associated access functions) can be used to implement a private input or output buffer,  and move data to or from a shared MWMR communication channel.  This buffer can be declared as a local variable in the stack of the reader/writer thread, and simplifies the access to the MWMR channel when the transfered data have a non fixed format, and must be analysed or produced byte per byte:
     76 * the buffer descriptor contains a byte pointer.
     77 * an input buffer is automatically refill from the associated MWMR channel when it becomes empty.
     78 * an output buffer is automatically transferred to the associated MWMR channel when it becomes full.
     79
    7680== __Private Buffer Initialization__ ==
    7781
     
    111115=== void '''mwmr_bufio_flush'''( mwmr_bufio_t* bufio ) ===
    112116This function transfer the current content of  the <bufio> output buffer to the associated MWMR channel when it is non empty.
    113