return to OCLUG Web Site
A Django site.
April 27, 2010

Bart Trojanowski
Bart's Blog
» How many times is my function used within an executable?

I am working on a large kernel module which had just come out of a large (and fruitful) internal API refactoring exercise. I now want to go through and cull the unused functions.

It turns out, all that is needed is the readelf utility (part of binutils package).

[Read More]

June 28, 2009

Bart Trojanowski
Bart's Blog
» select loop for X events

I am not a huge fan of threading when it can be avoided. I always thought that it was OK for GUI programs to be threaded. I just discovered that you can handle X events from a select loop.

    dis = XOpenDisplay(DISPLAY);
    fd = ConnectionNumber(dis);

    FD_SET(fd, &in_fds);

    select(fd+1, &in_fds, NULL, NULL, NULL);