Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 1998 22:20:12 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        jasone@canonware.com, lists@tar.com
Cc:        current@FreeBSD.ORG
Subject:   Re: Another Serious libc_r problem
Message-ID:  <199810210220.WAA06394@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
> >The point I was trying to make is that the
> >code does _not_ deadlock for the default (fast mutex).
>
> Yes, I missed your point.
>
> >I'm not sure that
> >this is a bug, but it is different than the behavior I've seen on other
> >systems.  Can someone say whether this is allowed by the POSIX spec?

POSIX says that "an attempt by the current owner of a mutex to relock
the mutex results in undefined behaviour".  It also says that if
the current thread already owns the mutex, then EDEADLK should
be returned.  I don't see any kind of counting mutex in the POSIX
spec.

It seems our pthread_mutex_lock() is wrong, and should return
EDEADLK in this case.

Dan Eischen
eischen@vigrid.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810210220.WAA06394>