Replacing FBSD mutexes
Sascha Wildner
saw at online.de
Tue Oct 23 02:10:00 PDT 2012
On Tue, 23 Oct 2012 10:47:24 +0200, <elekktretterr at exemail.com.au> wrote:
> I'm working on a new port of the nvidia driver to learn more about OS
> programming.
>
> What is the proper way to replace FreeBSD mutex locks?
>
> Such as:
>
> mtx_init(&mtx->mutex_mtx, "os.mutex_mtx", NULL, MTX_DEF | MTX_RECURSE);
>
> mtx_lock(&mtx->mutex_mtx);
One way is to look at existing drivers which both FreeBSD and DragonFly
have and see how it was ported over.
Another is to look at porting_drivers.txt which is in the tree, but you'll
learn less this way. :)
Sascha
More information about the Users
mailing list