[PATCH libX11] config: Add an option to initialize threads by default.

Rami Ylimäki rami.ylimaki at vincit.fi
Mon Jan 31 07:07:02 PST 2011


>
> Would it be possible to guard against misbehaving applications by 
> making it possible to configure libX11 with a dummy mutex?
>
> typedef int dummy_mutex;
>
> void lock(int *m) { assert(++(*m) == 1); };
> void unlock(int *m) { *m = 0 };
>
> It's not perfect but I guess it would be better than crashing in some 
> random place in libX11.
>
> -- Rami
>

Answering to self... That wouldn't probably work because the locks in 
libX11 seem to be recursive.

-- Rami



More information about the xorg-devel mailing list