Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2013 18:40:15 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        freebsd-threads@freebsd.org
Cc:        Koop Mast <kwm@rainbow-runner.nl>
Subject:   Mutexes and error checking
Message-ID:  <51E71D4F.5030502@marcuscom.com>

Next in thread | Raw E-Mail | Index | Archive | Help
It seems we might have a discrepancy between the way our pthread
implementation works compared to Linux.  If a mutex is set to NORMAL
type and one goes to unlock it, EPERM is returned unless the current
thread is the mutex owner.  While this sounds perfectly sane, it appears
Linux only returns EPERM if the mutex type is ERRORCHECK.

We are seeing some problems in ported code because of this.  As a
suggestion, if people agree, would it be possible to emulate the
behavior of Linux and only return EPERM if the mutex is of type
ERRORCHECK or RECURSVIE?

Joe
-- 
PGP Key : http://www.marcuscom.com/pgp.asc



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?51E71D4F.5030502>