I found one major bug which needs to be fixed as soon as possible. The rwlocks have never worked actually!?! If something will make owfs more stable, it's probably by fixing this bug. Strange that nobody have seen this before.
void my_rwlock_init(my_rwlock_t * my_rwlock) { _MUTEX_INIT(my_rwlock->protect_reader_count); sem_init(&(my_rwlock->allow_readers), 0, 1); sem_init(&(my_rwlock->no_processes), 0, 1); my_rwlock->reader_count = 1; // This should be initiated to 0! (we don't have any readers at startup) } Changing the reader_count to 0 will probably result into several dead-locks, so I haven't changed it yet. Write-locks will ALWAYS be allowed, even if there are several read-locks active. Look in the example below: my_rwlock_read_lock(rwlock); my_rwlock_read_lock(rwlock); my_rwlock_read_lock(rwlock); my_rwlock_write_lock(rwlock); print("this will be printed!\n"); Paul, do you want to look at this? /Christian On Thu, 2010-10-28 at 19:54 +1100, Rob Conway wrote: > Hi, > > Just wondering if there was an update on the roadmap for OWFS. It > does everything I want it to do however was just wondering if there > was any significant changes in the pipeline over the next 6 - 12 > months. > > I would also like to know if the Alias function is OK. I can remember > some time ago there was some kind of caution in using the alias > file. > > rob > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers