stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] [PATCH] Add battery2.lisp - works with multiple batteries, u


From: Julian Stecklina
Subject: Re: [STUMP] [PATCH] Add battery2.lisp - works with multiple batteries, uses sysfs.
Date: Mon, 21 Jul 2008 03:03:35 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Rupert Swarbrick <address@hidden> writes:

> This looks nice! I hadn't used battery.lisp before, but I have spent
> most of the day getting this working on my machine. As Julian Stecklina
> seems to have found [1], sbcl hangs when reading from sysfs with the
> normal functions with some versions of the kernel (including mine!).
>
> So I coded up a non-blocking "read-line-noblock" function to use
> instead, based on a suggestion Alistair Bridgewater gives in that
> thread. No doubt it's slower than pukka CL:READ-LINE, but we're only
> reading a line from a couple of files each time, so meh.

I took John's and your patches and cooked contrib/battery-linux.lisp
From it. Details are at:

http://cthulhu.c3d2.de/~blitz/gitweb/?p=stumpwm.git;a=shortlog;h=cpubattery

Code is in the cpubattery branch at 
http://cthulhu.c3d2.de/~blitz/git/stumpwm.git/.

I renamed your hacked read-line for SBCL to read-line-from-sysfs and
moved it to wrappers.lisp, since at least the cpu contrib could use the
same overhaul (and workaround). I also added a "LOAD-CONTRIB" function,
which figures out the contrib directory from stumpwm's asdf definition
and added some exports.

Comments?

Regards,
-- 
Julian Stecklina

Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)

(Spam-Experiment: http://cthulhu.c3d2.de/~astro/badpit.html )

Attachment: pgpyEFUmHuvl0.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]