On Sun, 2013-01-13 at 11:28 +0100, Heinrich Müller wrote: > > Any idea why the compiler is complaining about locking.h? > the "static" is there because then the mutex is initialized. It could > lead to erroneous behaviour > if you just deleted it. > I'll supply a fix for that.
I haven't looked at this code but this comment raised big alarm flags for me. Using "static" on a global variable in a .h file can result in independent unlinked copies in each .c or .cpp file that uses it. "static" at file scope means that variable exists only for that one file. Doing this for a mutex may mean that locks in different source files are not communicating with each other. To properly do a global variable, it should be declared as "extern" in the .h files and defined with an initializer in one single .c/.cpp file. -- Knowledge Is Power Power Corrupts Study Hard Be Evil _______________________________________________ Pan-users mailing list Pan-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/pan-users