Newbie Device Driver writer...

Phil Richardson prichardson at lincoln.ac.uk
Mon Sep 19 15:40:40 PDT 2005


Hi.

Im rather new to device driver writing under FreeBSD (in particular Im using 5.4). I have a PCI based IO card (4x32bit TTL presentation) and have written a simplistic driver thus far (basic handling is done completely through IOCTL calls - but it works).

However now I have started to think about using the device in a real way I realise it would be nice to implement asynchronous use. Maybe not the right term (forgive me) - but in essence I would really like to utilise this device along with other devices (such as a socket or tty) and use the Select() call to determine whats happening to who, and when.

However - I cannot find any reference anywhere within source code (that I can recognise at any rate) within existing device drivers (say sio.c) that suggest how you link a device driver to the select() call itself (I was expecting to find something like sio_select, much as sio_read, sio_write and sio_ioctl for example - which shows my inexperience and definate lack of understanding).

Anyone care to give some advice on how the kernel select() call can be linked into a home-made driver? A pointer to some documentation (dare I say that - documentation is a bit thin on device drivers so ive found...) would be a help.

Trusting someone somewhere might have a pointer or clue out there.....

Regards

Phil



More information about the freebsd-drivers mailing list