Zhang Yuchen wrote:
Hi,

currently, I am a bit confused about the semaphore between rtdev and
stack_mgr: how it is used to synchronize these two?


According to my understanding thus far, the real time task "do_stacktask" is
blocked at decrementing the semaphore, while there is


no packet pending in the rx_queue, which means the semaphore is zero. So
when some packets are received, the rtdev should increment the


semaphore somewhere, but I can not found the piece of code where the
semaphore is incremented. Is my understanding right? Could you give me


some hints? Thx in adv.


The related up operations are performed via rt_mark_stack_mgr by the drivers:


http://www.rts.uni-hannover.de/rtnet/lxr/source/include/stack_mgr.h#L57

What may be confusing is that the rtdev structure holds a pointer to the
semaphore stored in the device manager structure. This linking is not
really required. RTnet only knows of a single stack manager so far,
thus the semaphore could be a global variable as well. We still keep the
option of introducing multiple device managers for different interfaces.
Might only be useful in very special scenarios, though.

Jan


PS: I picked up your question about a developer list and created [EMAIL PROTECTED] yesterday - after producing a chat-like mail thread with Marc. :)


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ RTnet-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to