public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] code fatal error!
@ 2002-07-23  0:44 张 亮
  2002-07-23  4:38 ` Martin Buck
  2002-07-23 10:46 ` [ECOS] code fatal error! Nick Garnett
  0 siblings, 2 replies; 4+ messages in thread
From: 张 亮 @ 2002-07-23  0:44 UTC (permalink / raw)
  To: ecos-discuss; +Cc: nickg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 545 bytes --]


Hi,all!
     in eCos,kill() function does not release mutex owned by thread which 
will be killed. I think it as a fatal error.right? or more wise machanism 
avoids this state?

tks&regards!
 
                                                              johnsonest


_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] code fatal error!
  2002-07-23  0:44 [ECOS] code fatal error! 张 亮
@ 2002-07-23  4:38 ` Martin Buck
  2002-07-31 19:37   ` [ECOS] bridge in LWIP ? peter_ku
  2002-07-23 10:46 ` [ECOS] code fatal error! Nick Garnett
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Buck @ 2002-07-23  4:38 UTC (permalink / raw)
  To: ecos-discuss

ÕÅ ÁÁ wrote:
>      in eCos,kill() function does not release mutex owned by thread which
> will be killed.

Neither does it free its allocated memory, close its open files, etc.
Why should it release its mutexes?

> I think it as a fatal error.right?

Yes, a fatal programmer error. You're supposed to read the documentation
first.

> or more wise machanism
> avoids this state?

Send the thread a message asking it to clean up and terminate itself.

Martin

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] code fatal error!
  2002-07-23  0:44 [ECOS] code fatal error! 张 亮
  2002-07-23  4:38 ` Martin Buck
@ 2002-07-23 10:46 ` Nick Garnett
  1 sibling, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2002-07-23 10:46 UTC (permalink / raw)
  To: 张 亮; +Cc: ecos-discuss

张 亮 <johnsonest@hotmail.com> writes:

> Hi,all!
>      in eCos,kill() function does not release mutex owned by thread
> which will be killed. I think it as a fatal error.right? or more wise
> machanism avoids this state?
> 

If a thread owns a mutex it is presumably for a reason -- to protect
some data against concurrent access. If you just kill a thread you are
likely to leave that data in an inconsistent state. Releasing the
mutex does nothing to solve this problem, it just exposes the
inconsistent data to other threads. 

The correct approach, as others have mentioned, is to arrange for
threads to shut themselves down in an orderly fashion. 

-- 
Nick Garnett - eCos Kernel Architect


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] bridge in LWIP ?
  2002-07-23  4:38 ` Martin Buck
@ 2002-07-31 19:37   ` peter_ku
  0 siblings, 0 replies; 4+ messages in thread
From: peter_ku @ 2002-07-31 19:37 UTC (permalink / raw)
  To: ecos-discuss


Hi,

I am using lwip now. But I found there is no bridge function in lwip package. but supported in TCP/IP package.
If I need bridge function in lwip, anyone have suggestion?

thanks a lot for support.


Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-01  2:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-23  0:44 [ECOS] code fatal error! 张 亮
2002-07-23  4:38 ` Martin Buck
2002-07-31 19:37   ` [ECOS] bridge in LWIP ? peter_ku
2002-07-23 10:46 ` [ECOS] code fatal error! Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).