Clemens,
On Nov 20 2014 19:32, Takashi Sakamoto wrote:
And why are the substreams counters atomic? Can't they just be normal variables accessed from inside the mutex?
Just for my convinience. I didn't want to write many mutex_lock()/mutex_unlock() because wrong coding of them causes-dead lock, then push them inner stream.c. This idea is good except for reference couters, so I added atomic_t.
An attached patch achieves your idea over my patchset. Handling reference counter is easy to understand (because it's arithmetric operation) but I don't like much mutex_lock()/mutex_unlock().
Can I request you to explain about the advantages of your idea?
Oops. I attached a patch for Dice driver...
But my strategy for programming is nearly the same. Would you please give me some comments so as I can post new patchsets in this week?
Regards
Takashi Sakamoto o-takashi@sakamocchi.jp