This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_rwlock_rdlock()


Hi!
> We are currently working on fixing the Open Posix Testsuite (which is
> part of the LTP). And while doing that we found one test that seems to
> be correct but fails every time.
> 
> It could be found in LTP git on sf.net in
> 
> testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
> 
> Basically the test does:
> 
> main thread:   -> obtain read lock
> writer thread: -> attempt to obtain write lock - block
> reader tread:  -> attempt to obtain read lock - succeeds. 
> 
> And it expects the reader thread block, since another thread wants a
> write lock.
> 
> Which seems to be correct assumption accordingly to POSIX. While digging
> deeper I've found that such behavior is undefined in Single Unix
> Specification.

Anybody any comments on this?

I'm perfectly fine if anybody proves me wrong ;).

Or if it turns out this is not supported on Linux.

Or with any other reasonable resolution.

-- 
Cyril Hrubis
chrubis@suse.cz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]