I am looking for a guide on how to program for either the Linux or FreeBSD (includes 4.4BSD, NetBSD or OpenBSD) kernel. I would prefer to learn how to write device drivers, but anything would help.
If you know, please email me at *removed* or leave a post here
Regards,
Farhan
Last edited by Perderabo; 04-06-2005 at 01:05 PM..
Reason: Remove email address
Hi All,
I'm looking for role change to Linux device Driver developer. My current role has no connection to Linux Device driver development and hence to support my stand i want to do a certification for the same.
I have googled but couldn't found any standard certification. I have submitted... (1 Reply)
I want to work one day as a device driver programmer, OS I'm in love is Solaris :D
I am learning C in my free time which I don't have because college took my life and I need to study to pass.
In college we work in C++ / Java. These languages aren't inteded for device driver programming , saying... (0 Replies)
I have been reading prep questions for my second unix academy exam, and there's a nuance, I'm not sure I understand it correctly.
I've been under impression from my readings of book by Evi Nemeth and from unix academy DVDs I've been watching, that kernel's modules are drivers. I think of it, as... (25 Replies)
I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel.
1. The user space process makes an IOCTL call with pointer to a user memory buffer.
2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr
is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
HASHINIT(9) BSD Kernel Developer's Manual HASHINIT(9)NAME
hashinit, hashdone -- kernel hash table construction and destruction
SYNOPSIS
#include <sys/systm.h>
void *
hashinit(u_int chains, enum hashtype htype, bool waitok, u_long *hashmask);
void
hashdone(void *hashtbl, enum hashtype htype, u_long hashmask);
DESCRIPTION
The hashinit() function allocates and initializes space for a simple chaining hash table. The number of slots will be the least power of two
not smaller than chains. The customary choice for chains is the maximum number of elements you intend to store divided by your intended load
factor. The LIST... or TAILQ... macros of queue(3) can be used to manipulate the chains; pass HASH_LIST or HASH_TAILQ as htype to indicate
which. Each slot will be initialized as the head of an empty chain of the proper type. Because different data structures from queue(3) can
define head structures of different sizes, the total size of the allocated table can vary with the choice of htype.
If waitok is true, hashinit can wait until enough memory is available. Otherwise, it immediately fails if there is not enough memory is
available.
A value will be stored into *hashmask suitable for masking any computed hash, to obtain the index of a chain head in the allocated table.
The hashdone() function deallocates the storage allocated by hashinit() and pointed to by hashtbl, given the same htype and hashmask that
were passed to and returned from hashinit(). If the table contains any nonempty chain when hashdone() is called, the result is undefined.
RETURN VALUES
The value returned by hashinit() should be cast as pointer to an array of LIST_HEAD or TAILQ_HEAD as appropriate. hashinit() returns NULL on
failure.
SEE ALSO queue(3), hash(9), malloc(9)CODE REFERENCES
These functions are implemented in sys/kern/subr_hash.c.
HISTORY
A hashinit() function was present, without the htype or mflags arguments, in 4.4BSD alpha. It was independent of queue(3) and simply allo-
cated and nulled a table of pointer-sized slots. It sized the table to the largest power of two not greater than chains; that is, it built
in a load factor between 1 and 2.
NetBSD 1.0 was the first NetBSD release to have a hashinit() function. It resembled that from 4.4BSD but made each slot a LIST_HEAD from
queue(3). For NetBSD 1.3.3 it had been changed to size the table to the least power of two not less than or equal to chains. By NetBSD 1.4
it had the mflags argument and the current sizing rule.
NetBSD 1.5 had the hashdone() function. By NetBSD 1.6 hashinit() supported LIST or TAILQ chains selected with htype.
FreeBSD has a hashinit() with behavior equivalent (as of FreeBSD 6.1) to that in NetBSD 1.0, and a hashdestroy() that behaves as hashdone()
but checks that all chains are empty first. OpenBSD has a hashinit() comparable (as of OpenBSD 3.9) to that of NetBSD 1.4. This manual page
was added for NetBSD 4.0.
BUGS
The only part of the work of implementing a hash table that these functions relieve is the part that isn't much work.
BSD July 1, 2008 BSD