From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10047 invoked by alias); 27 Apr 2005 08:30:39 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 9841 invoked from network); 27 Apr 2005 08:30:20 -0000 Received: from unknown (HELO TopconRD.RU) (62.105.138.7) by sourceware.org with SMTP; 27 Apr 2005 08:30:20 -0000 Received: from osv.topcon.com ([62.105.138.5]) by TopconRD.RU (8.12.3/8.12.3/Debian-6.6) with ESMTP id j3R8UFLk016583; Wed, 27 Apr 2005 12:30:15 +0400 To: =?koi8-r?b?UnVi6W4gUOlyZXo=?= de Aranda Alonso Cc: ecos-discuss@sources.redhat.com References: <426F4C4A.4020701@sidsa.es> X-attribution: osv From: Sergei Organov Date: Wed, 27 Apr 2005 09:00:00 -0000 In-Reply-To: <426F4C4A.4020701@sidsa.es> Message-ID: <877jioipv1.fsf@osv.topcon.com> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Subject: Re: [ECOS] pthread_mutex_unlock when mutex is not locked X-SW-Source: 2005-04/txt/msg00268.txt.bz2 Rubén Pérez de Aranda Alonso writes: > Hi all, > I have found a problem when I want to unlock a mutex that is not locked > by any thread. Then the problem is in your code. The mutex is not appropriate for what you are doing, -- only the thread that locked the mutex is allowed to unlock it. Use something else, e.g., semaphore or condition variable to achieve your goal. -- Sergei. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss