Hi,
So if there's no lock then the data structure will only ever be
On Sun Jun 01, 2014 at 05:15:06 -0800, Yuxin Ren wrote:
> I am learning the IPC code in the Fiasco kernel. I have some questions here.
>
> If the receiver is not ready, we will add the sender to the sender_list.
> But I did find any lock to protect the sender_list. So if two threads at
> different cores try to add themselves to the sender_list at the same time,
> how can we guarantee the we are safe to do so?
manipulated by a single context (and preemption disabled as required).
Ipi is the base class that implements IPI functionality. So for example
> When sender and receiver are at different cores, we have to use IPI to
> communicate. Where is the code on IPC path to use IPI? I imagine the code
> around IPI should be complex, so it is great if someone can tell me the
> logic about it, especially about how we protect data structures, using
> locks or any other lock-free algorithm.
see for Ipi::send in context.cpp. Around that are functions that allow
to call functions on remote cores etc, also in context.cpp.
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers