lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] I need help!!!


From: manjunath
Subject: Re: [lwip-users] I need help!!!
Date: Thu, 27 Mar 2003 14:28:42 +0530 (IST)

hi,
thanks for replaying, i need one help, I need FTP, Telnet applications
which using lwip on RT-linux os. please give me the site/info regarding
this,

iam waiting for u'r replay;

and also i need to interface lwip to NIC, now my lwip is interfacing with
tap0 driver; how it can be done, please send details;

replay asap;
bye



-------------------------------------------------------------------------------
 "Imagination is more important than knowledge,
  For knowledge is limited, whereas imagination embraces the entire."
-------------------------------------------------------------------------------

On Thu, 27 Mar 2003, [ISO-8859-1] Sergio P?rez[ISO-8859-1] Alca?iz wrote:

> I'm reporting a need that I had when porting lwIP to RT-Linux. RT-Linux offers
> semaphores, so mapping rtl_sem to sys_sem was a simple task. But when posting 
> a
> semaphore something "special" happened. The RT-Linux function that posts
> semaphores has a call to the scheduler at the end of its implementation, so 
> when
> called, the task performing the call is ?ejected? from the CPU. When
> multithreading is possible as in RT-Linux, there is eventually a deadlock
> between tasks calling sys_mbox_post. The way I solved that was implementing a
> non ejecting post for semaphores that I called sys_sem_signal_pre. At least,
> that call is needed in sys_mbox_post implementation. ??Is this a bug?? I don't
> think so, but in those contexts similar to the RT-Linux one may cause errors.
> 
> 
> Regards. 
> Sergio.
> 
> 
> void
> sys_mbox_post(struct sys_mbox *mbox, void *msg)
> {
>   u8_t first;
>   unsigned int state;
> 
>   sys_sem_wait(mbox->mutex);
>   
>   mbox->msgs[mbox->last] = msg;
> 
>   if(mbox->last == mbox->first) {
>     first = 1;
>   } else {
>     first = 0;
>   }
>   
>   mbox->last++;
>   if(mbox->last == SYS_MBOX_SIZE) {
>     mbox->last = 0;
>   }
> 
>   sys_stop_interrupts(&state);
>   
>   if(first){
>     sys_sem_signal_pre(mbox->mail);
>   }
>   
>   sys_sem_signal(mbox->mutex);
>   
>   sys_allow_interrupts(&state);
> 
> }
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-users
> 





reply via email to

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