devPrivates patch

Eamon Walsh ewalsh at
Fri Sep 12 17:02:17 PDT 2008

Commit b6ab114212c0e4c3346ceb5b207f14c526ab81e7 changes the server
devPrivates to be based on an array, which should fix the performance
problems that have been reported, for example

With this change, the key values become pointer-to-int, and they need to
actually point to some space where an integer can be stored.  Basically

    static DevPrivateKey foo = &foo;

needs to change to this:

    static int blah;
    static DevPrivateKey foo = &blah;

Or, perhaps simpler:
    static int blah;  /* use (&blah) as the key. */

The xserver tree and drivers have already been changed, in particular
xserver commit ebea78cdba0ff14a397239ee1936bd254c181e1b (thanks to Tomas
Carnecky for this work).  Out-of-tree driver writers take note.

This change (by itself, at least) will not break older servers using
newer drivers, since the pointer values are still unique.

Eamon Walsh <ewalsh at>
National Security Agency

More information about the xorg mailing list