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/cancelable_lock.h

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

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to