iolist scatter / gather IO

Provides linked-list scatter / gather IO.

struct iolist iolist_t

iolist forward declaration

unsigned iolist_count(const iolist.h::iolist_t * iolist)

Count number of entries in an iolist_t.

Parameters

iolist:iolist to count

Return values

  • number of entries (zero for NULL parameter)
msp430_types.h::size_t iolist_size(const iolist.h::iolist_t * iolist)

Sum up number of bytes in iolist.

This function returns the summed ip lenght values of all entries in iolist.

Parameters

iolist:iolist to sum up

Return values

  • summed up number of bytes or zero if iolist == NULL
msp430_types.h::size_t iolist_to_iovec(const iolist.h::iolist_t * iolist, struct iovec * iov, unsigned * count)

Create struct iovec from iolist.

This function fills an array of struct iovecs with the contents of iolist. It will write the number of used array entries into count.

The caller must ensure that iov p points to an array of size >= count!

Parameters

iolist:iolist to read from
iov:ptr to array of struct iovec that will be filled
count:number of elements in iolist

Return values

  • iolist_size(iolist)
struct iolist

iolist structure definition

iolist.h::iolist_t * iol_next

ptr to next list entry

void * iol_base

ptr to this list entries data

msp430_types.h::size_t iol_len

size of data pointet to by ptr