The Pedigree Project  0.1
Public Member Functions | Public Attributes | List of all members
SharedBuffer Class Reference

Abstracts a buffer shared between multiple processes. More...

#include <util.h>

+ Collaboration diagram for SharedBuffer:

Public Member Functions

 SharedBuffer (size_t size)
 
 SharedBuffer (size_t size, void *handle)
 
virtual ~SharedBuffer ()
 
void * getBuffer ()
 
void * getHandle ()
 

Public Attributes

PedigreeIpc::SharedIpcMessagem_pFramebuffer
 

Detailed Description

Abstracts a buffer shared between multiple processes.

Pedigree uses shared IPC messages for this purpose, while Linux uses actual Linux shmem regions and passes file descriptors around.

Definition at line 33 of file util.h.

Constructor & Destructor Documentation

SharedBuffer::~SharedBuffer ( )
virtual
Todo:
Need a way to destroy the old framebuffer without freeing the shared region. Refcount on the region perhaps?

Definition at line 44 of file user/applications/winman/util.cc.

Member Function Documentation

void * SharedBuffer::getBuffer ( )

Retrieve the memory address of the buffer.

Definition at line 56 of file user/applications/winman/util.cc.

void * SharedBuffer::getHandle ( )

Retrieve a handle that can used create a matching SharedBuffer

Definition at line 51 of file user/applications/winman/util.cc.


The documentation for this class was generated from the following files: