Xorg input thread (2)

Nix nix at esperi.org.uk
Mon Jul 9 12:10:16 PDT 2007


On 9 Jul 2007, Jesse Barnes stated:
> It's fairly easy using gcc extensions, e.g. using 
> __attribute__((section("mouse_functions")) for all mouse related functions 
> and data.  Then at startup time, the mlock routine would lock that whole 
> section (you'd have to use some ELF parsing routines to get the address and 
> length of the section used).

Actually you should be able to use a linker script to place marker
symbols at the start and end of the section, and then just mlock the
range between the addresses of those symbols.

(I can dig up examples if you like, but there are plenty scattered
around: I think the Linux kernel alone has half a dozen.)

-- 
`... in the sense that dragons logically follow evolution so they would
 be able to wield metal.' --- Kenneth Eng's colourless green ideas sleep
 furiously



More information about the xorg mailing list