Re: [waffle] [PATCH v2 2/3] wcore: rework non-compatible mutex initialization

2015-03-27 Thread Chad Versace
Quoting Emil Velikov (2015-03-26 19:24:21) On 26 March 2015 at 14:50, Chad Versace chad.vers...@intel.com wrote: Quoting Emil Velikov (2015-03-25 07:30:00) Indeed you're bang on the spot. id_counter should be locked throughout a series of display_{connect, disconnect}, thus we should push

Re: [waffle] [PATCH v2 2/3] wcore: rework non-compatible mutex initialization

2015-03-26 Thread Chad Versace
Quoting Emil Velikov (2015-03-25 07:30:00) On 24 March 2015 at 17:37, Jose Fonseca jfons...@vmware.com wrote: Is wcore_display_teardown called only once, or when destroying each display? If the latter, then it's not safe to call `mtx_destroy(mutex)` on `wcore_display_teardown`. Otherwise

Re: [waffle] [PATCH v2 2/3] wcore: rework non-compatible mutex initialization

2015-03-26 Thread Jose Fonseca
On 26/03/15 14:50, Chad Versace wrote: Quoting Emil Velikov (2015-03-25 07:30:00) On 24 March 2015 at 17:37, Jose Fonseca jfons...@vmware.com wrote: Is wcore_display_teardown called only once, or when destroying each display? If the latter, then it's not safe to call `mtx_destroy(mutex)` on

[waffle] [PATCH v2 2/3] wcore: rework non-compatible mutex initialization

2015-03-24 Thread Emil Velikov
C11 does not specify a static initializer, based on the idea that the a mutex will be platform and/or implementation dependent. As such the alternative solution is to initialize the mutex with call_once/mtx_init. This will allow us to remove the transition hack, and in due time move to the