| That non-op function seems to be called in Threads.c. It looks like an interface that was
never needed, but left there. Given that the author is not around anymore, we should just
review it and remove if needed.
The global lock seems to be used in cases where two instances of Csound try to load/initialise
some plugins (pmidi only actually).
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 19 Jun 2016, at 17:28, jpff wrote:
>
> The file H/csGblMtx.h as lines like below that defies (not declares)
> static variables and functions. This gives rise to warnings about
> unused static functions
> In file included from /home/jpff/csound6/Top/csound.c:39:0:
> /home/jpff/csound6/./H/csGblMtx.h:33:13: warning: ‘csound_global_mutex_init_’ de
> fined but not used [-Wunused-function]
> static void csound_global_mutex_init_(void)
> ^
> and potentially wasted space. Can this be cleaned up? I always taught
> that this was bad C style
>
> ==John
>
> static pthread_mutex_t csound_global_lock_ = PTHREAD_MUTEX_INITIALIZER;
>
> static void csound_global_mutex_init_(void)
> {
> }
>
> static void csound_global_mutex_unlock(void)
> {
> pthread_mutex_unlock(&csound_global_lock_);
> }
>
> static void csound_global_mutex_lock(void)
> {
> pthread_mutex_lock(&csound_global_lock_);
> }
>
> static void csound_global_mutex_destroy_(void)
> { |