Hello Eunseok Kim,
welcome to the mailing list! :-)
We wana change to Genode thread from pthread of Fawn Source. But, we have some problem how to convergen lock and RW lock of Pthread. Could you tell me which lock function is appropriate to use for lock and RW lock in the Genode Thread?
There is currently no distinction between an rw-lock and a plain lock. There is just the 'Lock' class. The important pieces are:
The interface:
https://github.com/genodelabs/genode/blob/master/base/include/base/cancelabl...
The generic implementation:
https://github.com/genodelabs/genode/blob/master/base/src/base/lock/lock.cc
The platform-specific back-end functions are located at the 'base-<platform>/src/base/lock/lock_helper.h' file.
The basic functioning of the lock is described in the following posting at the L4ka::Pistachio mailinglist:
https://lists.ira.uni-karlsruhe.de/pipermail/l4ka/2010-July/002318.html
So far, we hadn't had the urgent need for a rw-lock in Genode. In principle, you should be safe to use the normal 'Lock' in cases where an rw-lock is normally used. The code will probably just scale not as good as by using an rw-lock when the lock is contended by multiple readers.
Alternatively, you may consider implementing an rw-lock by following the lines of the 'Genode::Lock' and using the same backend function interface (the functions provided by 'lock_helper.h'). If you take this path, I would be very interested in your findings.
Best regards Norman