added special fix for new direct udp packet transmissions via tcpip_input()
delaying tcpip_input call until yieldable
This commit is contained in:
parent
5528198929
commit
85fa271548
4 changed files with 16 additions and 5 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: radio-arch.c,v 1.7 2006/10/09 14:13:04 fros4943 Exp $
|
* $Id: radio-arch.c,v 1.8 2006/10/09 14:42:25 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dev/radio-arch.h"
|
#include "dev/radio-arch.h"
|
||||||
|
@ -105,6 +105,10 @@ doInterfaceActionsBeforeTick(void)
|
||||||
// Hand over new packet to uIP
|
// Hand over new packet to uIP
|
||||||
uip_len = simInSize;
|
uip_len = simInSize;
|
||||||
memcpy(&uip_buf[UIP_LLH_LEN], &simInDataBuffer[0], simInSize);
|
memcpy(&uip_buf[UIP_LLH_LEN], &simInDataBuffer[0], simInSize);
|
||||||
|
|
||||||
|
if (simNoYield)
|
||||||
|
simDoTcpipInput = 1;
|
||||||
|
else
|
||||||
tcpip_input();
|
tcpip_input();
|
||||||
simInSize = 0;
|
simInSize = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: simEnvChange.c,v 1.5 2006/10/09 14:13:42 fros4943 Exp $
|
* $Id: simEnvChange.c,v 1.6 2006/10/09 14:42:38 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -39,6 +39,7 @@ extern const struct simInterface *simInterfaces[];
|
||||||
|
|
||||||
char simDontFallAsleep = 0;
|
char simDontFallAsleep = 0;
|
||||||
char simNoYield = 0;
|
char simNoYield = 0;
|
||||||
|
char simDoTcpipInput = 0;
|
||||||
|
|
||||||
int simProcessRunValue;
|
int simProcessRunValue;
|
||||||
int simEtimerPending;
|
int simEtimerPending;
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: simEnvChange.h,v 1.5 2006/10/09 14:13:42 fros4943 Exp $
|
* $Id: simEnvChange.h,v 1.6 2006/10/09 14:42:38 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SIMENVCHANGE_H__
|
#ifndef __SIMENVCHANGE_H__
|
||||||
|
@ -46,6 +46,7 @@ extern int simNextExpirationTime;
|
||||||
// Variable that when set to != 0, stops the mote from falling asleep next tick
|
// Variable that when set to != 0, stops the mote from falling asleep next tick
|
||||||
extern char simDontFallAsleep;
|
extern char simDontFallAsleep;
|
||||||
extern char simNoYield;
|
extern char simNoYield;
|
||||||
|
extern char simDoTcpipInput;
|
||||||
|
|
||||||
// Definition for registering an interface
|
// Definition for registering an interface
|
||||||
#define SIM_INTERFACE(name, doActionsBeforeTick, doActionsAfterTick) \
|
#define SIM_INTERFACE(name, doActionsBeforeTick, doActionsAfterTick) \
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: code_main_template,v 1.9 2006/10/09 14:14:18 fros4943 Exp $
|
* $Id: code_main_template,v 1.10 2006/10/09 14:42:55 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,6 +116,11 @@ start_process_run_loop(void *data)
|
||||||
/* Always pretend we have processes left while inside process_run() */
|
/* Always pretend we have processes left while inside process_run() */
|
||||||
simProcessRunValue = 1;
|
simProcessRunValue = 1;
|
||||||
|
|
||||||
|
if (simDoTcpipInput) {
|
||||||
|
simDoTcpipInput = 0;
|
||||||
|
tcpip_input();
|
||||||
|
}
|
||||||
|
|
||||||
simProcessRunValue = process_run();
|
simProcessRunValue = process_run();
|
||||||
|
|
||||||
// Check if we must stay awake
|
// Check if we must stay awake
|
||||||
|
|
Loading…
Reference in a new issue