This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
FW: RFC: bsd_tcpip patch on synch.c
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "j dot lambrecht at televic dot com" <j dot lambrecht at televic dot com>
- Cc: "ecos-devel at ecos dot sourceware dot org" <ecos-devel at ecos dot sourceware dot org>
- Date: Thu, 27 Jun 2013 19:07:15 +0200
- Subject: FW: RFC: bsd_tcpip patch on synch.c
- References: <51CC0714 dot 6040805 at televic dot com>,<DUB124-W44EE5E989F221552E035FDE4750 at phx dot gbl>,<DUB124-W44538C6E274AF947C90B72E4750 at phx dot gbl>,<51CC4A34 dot 1070107 at televic dot com>,<DUB124-W17E1B3022EDF1B00BF4396E4750 at phx dot gbl>
Jürgen,
> After digging deep, I found that our problem was caused by something
> else, so this fix is not needed, but we kept it because we did not like
> that construct as you also point out.
>>
>> If you really expect cyg_mutex_lock to ever return false,
>> then the right thing to do would be to assert(false)
>> and print a callstack or directly enter the debugger.
> No problem anymore..
> But is there a better way to loop over the mutex lock?
no, IMHO a simple "cyg_mutex_lock(&spl_mutex);" would have been enough.
But these patches are not about style at all.
But by the way there is another patch in that vicinitry:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629
That may apply to everyone who uses a tick count other than the default.
Regards
Bernd.