Bug 544607 - Add Shmem::IsWriteable/Shmem::IsReadable r=cjones

--HG--
extra : rebase_source : 25a2ef756c682bc6a74797025e223fbbc3aaf4d3
This commit is contained in:
Joe Drew 2010-03-22 13:33:43 -07:00
Родитель 7a488b91dc
Коммит 71a6fe1619
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -145,6 +145,22 @@ public:
return *this;
}
// Returns whether this Shmem is writable by you, and thus whether you can
// transfer writability to another actor.
bool
IsWritable() const
{
return mSegment != NULL;
}
// Returns whether this Shmem is readable by you, and thus whether you can
// transfer readability to another actor.
bool
IsReadable() const
{
return mSegment != NULL;
}
// Return a pointer to the user-visible data segment.
template<typename T>
T*