To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 547
546  |  548
Subject: 
LNP not multitasking proof ?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 2 Dec 1999 02:41:36 GMT
Viewed: 
975 times
  
Hi there, during my study of LNP i just stumbled across a point where i
doubt it's not multitasking proof.

it's related to transmissions of lnp-messages.

lnp_logical_write() is ok, it waits for semaphore tx_sem at the
beginning and posts the semaphore before return.
However, the callers of lnp_logical_write(), namely:
lnp_integrity_write() and lnp_addressing_write() both use the global
lnp_buffer[] to construct their packets. Thus, if several tasks call
either lnp_addressing_write() or lnp_logical_write() simultanously, they
will all write to the same buffer before the semaphore check is done.
The transmission machinery itself will work, but most probably with
unexpected results on the receiving side.

My suggestion: do the semaphore check & post in both
lnp_integrity_write() and lnp_addressing_write(), (and the other 6
lnp_xxx_write functions that are still to be invented as well ) and omit
it from lnp_logical_write().



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR