Python for drivers?

Daniel Berlin+list.python dan at cgsoftware.com
Sun Apr 23 01:26:49 EDT 2000


Moshe Zadka <moshez at math.huji.ac.il> writes:

Also, considering you have to write interrupt handlers, you'd end up
with some very wacky code to prevent screwing yourself over.


> On Sun, 23 Apr 2000, jepler epler wrote:
> 
> > If you can use a tool like SWIG (or a hand written C module) to provide
> > access to the necessary low-level features, you may be able to do this.
> > 
> > For instance, if the card needs the idea of 'store {8,16,32}-bit integer X at
> > index L of the video card's address space' and 'read {8,16,32}-bit
> > integer at index L of the video card's address space', then you'd just
> > need to write those following functions in a C module for Python to call.
> 
> Um...unless you're talking about something like Hurd-like userspace
> drivers, it'd still be pretty close to impossible. In general, you avoid
> memory allocation and deallocation inside the kernel like the flu,
> especially few-bytes allocation. On the other hand, the Python interpreter
> usually allocates and dellocates like crazy. This would probably kill
> a Linux kernel.
> 




More information about the Python-list mailing list