[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] Problem with netconn_write()
From: |
Mountifield, Tony |
Subject: |
RE: [lwip-devel] Problem with netconn_write() |
Date: |
Thu, 19 Aug 2004 10:27:15 +0100 |
Hi Peter,
Thanks for your comments...
> Years ago, I ran into a timinig-dependent problem with
> netconn_write(), which has probably the same roots.
> IIRC I came to the same conclusion,
> the semaphore should exist until netconn_close().
I see that netconn_delete() also deletes the semaphore if it still exists,
which is a much more logical place, so I have commented out the semaphore
deletion in netconn_write(). Now my application works fine.
> >In any case, assuming sys_sem_signal() and sys_sem_free()
> >can't block, there should perhaps be some exclusion to make
> >sure that a test of conn->sem and its subsequent use are
> >indivisble, for semaphores that can be dynamically deleted.
> >
> >
> A usual implementation of sys_sem_signal() is likely to
> leave through the OSes scheduler, switching to a different
> task, so I guess the check and the call can not be made
> indivisible by a simple solution like the "lightweight
> protection" here (which disables task-switching).
Yes, you're right.
> I hesitate to propose a more complicated solution. The best
> would be to remove the need for the check.
Yes, I agree.
Cheers
Tony
***********************************************************************************
This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television. If received in error please
notify the sender and destroy the original message and attachments.
www.tandbergtv.com
***********************************************************************************