public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Mutex & Asserts during initialisation
@ 2005-07-08 12:15 Will Wagner
  2005-07-08 14:08 ` Andrew Lunn
  0 siblings, 1 reply; 10+ messages in thread
From: Will Wagner @ 2005-07-08 12:15 UTC (permalink / raw)
  To: eCos Discussion

Hi All,

I am trying to run with asserts on to test a couple of things. However 
there seems to be a problem with the mutex check_this function has been 
implemented.

If anything tries to lock a mutex before the scheduler has been started 
then an assert goes off. This is because when locking the mutex 
Cyg_Thread::self() returns NULL. So in the check this function locked is 
true but owner is NULL so it fails.

This means that you can't use SPI or i2c before the scheduler starts. If 
you have any driver that is initialised via static constructor that uses 
either of those then the system asserts. An example of this would be the 
DS1307 wallclock.

How has anyone worked around this in the past?

Thanks,

Will


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

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

end of thread, other threads:[~2005-07-12  1:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08 12:15 [ECOS] Mutex & Asserts during initialisation Will Wagner
2005-07-08 14:08 ` Andrew Lunn
2005-07-08 14:18   ` Will Wagner
2005-07-09 14:30   ` Paul D. DeRocco
2005-07-11  7:52     ` Fabian Scheler
2005-07-11  9:36     ` Nick Garnett
2005-07-11 10:30       ` [ECOS] issues: memcpy in flash_config_insert_value & exec -r Michael Anburaj
2005-07-12  1:22         ` [ECOS] SOS: " Michael Anburaj
2005-07-12  1:30           ` Gary Thomas
2005-07-11 10:47       ` [ECOS] Mutex & Asserts during initialisation Bart Veer

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).