Melchior FRANZ:

- don't unlock an already unlocked mutex (Someone wanted to be on
  the safe side with this, but the result is undefined and makes
  pthread_mutex_destroy fail. Reference: manpage for
  pthread_mutexattr_gettype/The Open Group[1]: "Attempting to
  unlock a mutex of this type which is not locked results in
  undefined behaviour.")

- re-enabled all subsystem destructors again (this has been disabled
  because fgfs hung on exit, due to the mutex destroy failure from
  above.)


Reference:
  http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_mutexattr_gettype.html
This commit is contained in:
fredb
2006-02-21 12:59:31 +00:00
parent b2a4cd488d
commit a75b4af374
2 changed files with 2 additions and 3 deletions

View File

@@ -224,8 +224,7 @@ SGSubsystemGroup::Member::Member (const Member &)
SGSubsystemGroup::Member::~Member ()
{
// FIXME: causes a crash
// delete subsystem;
delete subsystem;
}
void

View File

@@ -183,7 +183,7 @@ public:
/**
* Destroy this queue.
*/
~SGBlockingQueue() { mutex.unlock(); }
~SGBlockingQueue() {}
/**
*