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]

How to implement readers-writer lock with timeout, a hard question.


Hello everyone, I'm new to mailing list. I think this list is the proper place to ask my question.

Is there an implementation of readers-writer lock with timeout support on Linux(no doubt, using glibc). I've known quite some implementation of readers-writer lock without timeout, like that in boost and ACE(by Douglas C. Schmidt). By saying "timeout support", I mean, if some thread acquires read or write lock but fails to get it before "timeout" elapses, the calling thread returns as if the thread has never acquired lock.

I had not seen an implementation on Windows 2000/XP either, but I managed to implement it some months ago, with help of the great QueueUserAPC Win32 function. Now, I'd like to know how to implement readers-writer lock with timeout on Linux. Can it be implemented with glibc or some more kernel functions must be added to fulfill this? Searching on google for weeks and no luck. Does anyone have an idea. Thanks in advance.


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