tech-kern archive

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

Re: Equivalent of FreeBSD kernel semaphore?



        hello.  When I did the work to get the zaptel drivers running under
NetBSD-5.x, I used condiition variables and mutexes to get the job done.
It was a fairly large mechanical job to get things going, but conceptually,
it was pretty simple, and once I got the basic formats right, everything
ran pretty smoothly.  My guess is that there is a osdep.h file in the dahdi
source tree somewhere, and you can do most of the definitions for the
infrastructure you want to use in there.  Then it's just a matter of minor
cleanup to deal with differences in the arguments to falloc and friends
inside the NetBSD kernel.
-Brian

On Jan 10,  3:54am, Christos Zoulas wrote:
} Subject: Re: Equivalent of FreeBSD kernel semaphore?
} In article <1kdmwvf.163omky1siecjlM%manu%netbsd.org@localhost>,
} Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:
} >Hello
} >
} >First problem for porting DADHI drivers: the FreeBSD version uses kernel
} >semaphores:
} >http://www.unix.com/man-page/FreeBSD/9/sema/
} >
} >What is the NetBSD equivalent? I know our locks, conditions variables,
} >but what about semaphores?
} 
} Why don't you implement them the same way like FreeBSD did, using a mutex
} and a condition variable? I don't know how they are used in the DAHDI driver
} but this might not be even necessary.
} 
} christos
} 
>-- End of excerpt from Christos Zoulas




Home | Main Index | Thread Index | Old Index