lwip-users
[Top][All Lists]
Advanced

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

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


From: Ed Sutter
Subject: Re: [lwip-users] RE: lwip-users Digest, Vol 7, Issue 12
Date: Thu, 18 Mar 2004 08:06:43 -0500

Eric,
Yea, looks that way.  I have my timeoutlist declared as a table
of 64 (max uCOS tasks).  That takes a little more memory for the
table, but eliminates the upfront logic in the sys_arch_timeouts()
version below.  Six of one...
Ed

Eric Shufro wrote:
> 
> 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
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/lwip-users




reply via email to

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