lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] RE: lwip-users Digest, Vol 7, Issue 12


From: Eric Shufro
Subject: [lwip-users] RE: lwip-users Digest, Vol 7, Issue 12
Date: Wed, 17 Mar 2004 17:16:03 -0500

Hi ED, thanks for having a look at some of that code. Perhaps we have
different things going on in sys_arch.c

> In sys_arch.c:
> 
> //-------------------------------------
> struct sys_timeouts *
> sys_arch_timeouts(void)
> {
>     INT8S currPrio;
> 
>     currPrio = (OSPrioCur-LWIP_START_PRIO);
> 
>     if((currPrio < 0) || (currPrio >= LWIP_MAX_TASKS))
>     {
>         /* Error! */
>       printf("sys_arch_timeouts: Prio not found\n");
>         while(1);
> 
>     }
> 
>     return &timeoutlist[currPrio];
> }
> 
> //-------------------------------------


I tried doing as you suggested and simply returning &timeoutlist[OSPrioCur];
But the timeoutlist array is declared as 

static struct sys_timeouts timeoutlist[LWIP_MAX_TASKS];

Where LWIP_MAX_TASKS = 2 (defined)

So, when the OSPrioCur returns 5, the array index is out of range and the
machine crashes.

--> What is the point of the sys_arch_timeouts in general? How does that fit
into the puzzle? Why so we ever call that function? Does it have to do with
the fact that I have not registered the tcpip, or any other, timer functions
yet?

Thanks again,

--Eric Shufro
address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]