Subject: NetBSD & FreeBSD kernel API sync (incomplete proposal)
To: None <email@example.com>
From: Jaromír Doleček <firstname.lastname@example.org>
Date: 07/22/2000 17:51:12
here is random set of things I faced. The list of differences is
surely not exhausive, feel free to comment on what should be added.
Note this is kernel API only.
It would be really cool to haggle whether FreeBSD changes would be
usable also for us or if we have superior interface. List of latter
things would then be forwarded to them so that they could consider
adapting their API to ours.
SQUEUE (N) vs. STAILQ (F) STAILQ seems like better name, but ..
hzto() vs. tvtohz()
time.h: timer*() vs. timeval*() macros (FreeBSD timeval*() also take
one less argument)
hashinit() doesn't take 'flags' on FreeBSD, IMHO should
VOP_UNLOCK(), vget(), vn_lock() take additional 'proc *' parameter on FBSD
FreeBSD: socket protosw: pru_usrreq is obsolete, there is new
pru_usrreqs with explicit array of function pointers - FWIW,
I think traditional BSD (and NetBSD) pru_usrreq makes it easier
to NOT implementing some of the ops, and we have the so*() functions
anyway, so it doesn't look like very usable change to me ..
they also add (equivalent of) PRU_POLL
so*() take additional 'proc *' parameter (last one)
NetBSD lacks dup_sockaddr()
there is no equivalent to FreeBSD time_second on NetBSD I'm aware of
- probably just use mono_time.tv_sec ?
asleep(), await() in FreeBSD - I think those are unnecessary and code
actually of need of them is actually broken and should be fixed (so
I don't think those should appear on NetBSD)
It would be really nice if they would sync lockmgr() changes,
there is some code (namely FreeBSD smbfs), which implements it's own
spin locks where ones provided by NetBSD lockmgr() would do nicely.
Do people have any opinions on what interface for above mentioned things
makes better sense, so that we can pick it and try hard to use same
on both true *BSD's ?
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@