Coin Logo http://www.sim.no
http://www.coin3d.org

SbMutex Class Reference
[Portable thread-handling abstractions]

A basic class for managing a mutex.

This class provides a portable framework around the mutex interface of the underlying native thread-handling toolkit. More...

#include <Inventor/threads/SbMutex.h>

List of all members.

Public Member Functions

 SbMutex (void)
 ~SbMutex (void)
int lock (void)
SbBool tryLock (void)
int unlock (void)

Friends

class SbCondVar


Detailed Description

A basic class for managing a mutex.

This class provides a portable framework around the mutex interface of the underlying native thread-handling toolkit.


Constructor & Destructor Documentation

SbMutex::SbMutex ( void   )  [inline]

Constructor.

SbMutex::~SbMutex ( void   )  [inline]

Destructor.


Member Function Documentation

int SbMutex::lock ( void   )  [inline]

This method locks the mutex. 0 is returned on success.

If the mutex was previously unlocked, the thread will lock the mutex and continue running. If the mutex was already locked when this call is made, the thread will be suspended until the other thread holding the mutex releases it.

This is a blocking operation.

Referenced by SbThreadAutoLock::SbThreadAutoLock().

SbBool SbMutex::tryLock ( void   )  [inline]

This method tries to lock the mutex, and returns whether it was locked or not. This is a non-blocking operation.

int SbMutex::unlock ( void   )  [inline]

This method unlocks the mutex.

Referenced by SbThreadAutoLock::~SbThreadAutoLock().


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 23 16:33:41 2009 for Coin by Doxygen. 1.5.8