Barrelfish
Functions
bulk_buffer.c File Reference

Functions

errval_t bulk_buffer_map (struct bulk_buffer *buffer)
 
errval_t bulk_buffer_unmap (struct bulk_buffer *buffer)
 
uint8_t bulk_buffer_is_owner (struct bulk_buffer *buffer)
 
uint8_t bulk_buffer_is_copy (struct bulk_buffer *buffer)
 
uint8_t bulk_buffer_is_valid (struct bulk_buffer *buffer)
 
errval_t bulk_buffer_change_state (struct bulk_buffer *buffer, enum bulk_buffer_state new_state)
 
errval_t bulk_buffer_assign_cap (struct bulk_buffer *buffer, struct capref cap, size_t cap_offset)
 

Function Documentation

errval_t bulk_buffer_assign_cap ( struct bulk_buffer buffer,
struct capref  cap,
size_t  cap_offset 
)

Sets a cap + offset pair for a buffer.

Parameters
bufferthe buffer
capcap to assign
cap_offsetoffset in the cap
errval_t bulk_buffer_change_state ( struct bulk_buffer buffer,
enum bulk_buffer_state  new_state 
)

changes the state of the buffer and adjust the mappings accordingly

Parameters
bufferthe buffer to change the state
statenew state to transition the buffer to
uint8_t bulk_buffer_is_copy ( struct bulk_buffer buffer)

checks if the buffer is a read only copy

Parameters
bufferthe buffer to check
Returns
true if the buffer is a read only copy false if the buffer is not a copy
uint8_t bulk_buffer_is_owner ( struct bulk_buffer buffer)

checks if the buffer is owned by the calling domain

Parameters
bufbuffer to check for ownership
uint8_t bulk_buffer_is_valid ( struct bulk_buffer buffer)

checks if the buffer is valid

Parameters
bufferthe buffer to check
Returns
true if the buffer is valid false if the buffer is not valid
errval_t bulk_buffer_map ( struct bulk_buffer buffer)

does the mapping of the buffer by filling the backing memobj with the frame and faulting on it. This is a no-op in full trusted mode.

Parameters
bufthe buffer to map

Note: The new state of the buffer as well as the backing capability must be set in the buffer struct.

errval_t bulk_buffer_unmap ( struct bulk_buffer buffer)

does the unmapping of a single buffer according to the trust level,

  • if the channel is fully trusted, this results in a no-op.
  • otherwise, the mapping is removed

This function does not revoke or delete any capabilities

Parameters
bufthe buffer to unmap