The idea of the extra layer of abstraction would be to make for an extremely simple implementation, rather than trying to re-invent the wheel (making ANOTHER custom mutex wrapper).
As far as dropping support for the C++11 Standard Library, I'm not sure I agree. It provides some really great functionality, is available on all of our listed target systems (QNX is not on that list AFAIK), and are well performing. Additionally, the clang C++ Standard Library has better licensing if an OEM cares enough. The alternative is to either A: write our own versions (very error prone and a waste of time), or B: use Boost's versions, which come with additional concerns. -----Original Message----- From: Macieira, Thiago Sent: Tuesday, February 24, 2015 10:51 AM To: Keane, Erich Cc: iotivity-dev at lists.iotivity.org Subject: Re: [dev] Thread-safety solution for the ITVTContext On Tuesday 24 February 2015 10:35:37 Keane, Erich wrote: > Sorry for the top-post, Outlook isn't being very kind on its quoting: > > For the mutexes, it seems that choice #1 has already been made for a good > amount of the stack. > > That said, rather than writing our own, I'd prefer to propose > #6: write/expose a mutex library, use the standard ABI, and implement via > std::mutex. > > This seems like the least amount of work for cross-platformability, and will > compile just about anywhere. std::mutex is a wrapper around pthread_mutex on POSIX systems, so why keep the extra layer of abstraction? Also, that would imply using C++ code from the C SDK library. I don't have a problem with that, but it might be an issue on some systems because, as an item of the C++11 Standard Library, it might not be available on all target systems (think QNX 6.5). GCC's C++ Standard Library is licensed GPLv3 + exception, which some OEMs may not like. No, we need to drop requirement for the C++11 Standard Library. Using C++11 core language features is fine, Standard Library isn't. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
