From: Christian P. <cp...@us...> - 2005-01-23 13:29:05
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17913/src/System Modified Files: Mutex.posix.cpp Log Message: Linux timed-mutex is not recursive!! Bad hack needed! - do not create timed mutex on linux (for now). Index: Mutex.posix.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/Mutex.posix.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Mutex.posix.cpp 22 Dec 2004 17:54:36 -0000 1.1.1.1 +++ Mutex.posix.cpp 23 Jan 2005 13:28:55 -0000 1.2 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2004 by Christian Prochnow * + * Copyright (C) 2004,2005 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * @@ -48,12 +48,13 @@ pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); - // Linux needs this for timed locking to work - #ifdef PCLASSES_HAVE_PTHREAD_MUTEX_TIMED_NP - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_TIMED_NP); - #else + // Linux needs this for timed locking to work + // @fixme .. linux timed-mutex is not recursive!!!!!!!!!! + //#ifdef PCLASSES_HAVE_PTHREAD_MUTEX_TIMED_NP + //pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_TIMED_NP); + //#else pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - #endif + //#endif if(name) { |