Re: AOO plugin for PD on SGI Irix

Wolfgang Gaggl via Pd-list <[email protected]>
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
>> As I said, you just need to replace the shared_mutex with a shared_spinlock.

Yes, that was the best solution all along! 

In sink.hpp
#if defined(__sgi) && defined(__mips__)
using sink_update_lock = sync::shared_spinlock;
#else
using sink_update_lock = sync::shared_mutex;
#endif
And further down:
private:
    using shared_lock = sync::shared_lock<sink_update_lock>; // sink_update_lock, not shared_mutex
    using unique_lock = sync::unique_lock<sink_update_lock>;
    using scoped_lock = sync::scoped_lock<sink_update_lock>;
    using scoped_shared_lock = sync::scoped_shared_lock<sink_update_lock>;

In source.hpp
#if defined(__sgi) && defined(__mips__)
using source_update_lock = sync::shared_spinlock;
#else
using source_update_lock = sync::shared_mutex;
#endif
and further down:
 private:
    using shared_lock = sync::shared_lock<source_update_lock>;  // source_update_lock, not shared_mutex
    using unique_lock = sync::unique_lock<source_update_lock>;
    using scoped_lock = sync::scoped_lock<source_update_lock>;
    using scoped_shared_lock = sync::scoped_shared_lock<source_update_lock>;
    using scoped_spinlock = sync::scoped_lock<sync::spinlock>;

Or maybe just once in sync.hpp... 

No changes in source.cpp or sink.cpp needed (even the try_to_lock works fine as is). 

All works now, I love clean solutions! 

Thank you!
---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/HSGOXJKTTKJ6D3G4WPQFK2KLXD5S3FSJ/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.