bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH mig] Provide default implementations for server functions


From: Justus Winter
Subject: Re: [PATCH mig] Provide default implementations for server functions
Date: Fri, 07 Nov 2014 15:41:43 +0100
User-agent: alot/0.3.5

Quoting Samuel Thibault (2014-11-07 15:07:12)
> Justus Winter, le Fri 07 Nov 2014 15:04:17 +0100, a écrit :
> > By providing default implementations, servers can provide partial
> > implementations of protocols without having to stub out functions.
> 
> I'm not sure whether we want that.  When somebody has added something to
> a protocol, in my own servers I'd probably prefer to get a link failure
> rather that programs starting to get ENOTSUP errors.

For me that's a feature.  If someone adds a method to a protocol, and
my server doesn't implement it yet, it returns EOPNOTSUPP.

However, since EOPNOTSUPP is a libc thingie, and we don't have that in
the kernel, I went for a compromise.  I create default implementations
returning MIG_EOPNOTSUPP guarded by #ifdef MIG_EOPNOTSUPP.  So one
only gets default implementations if one defines an appropriate
MIG_EOPNOTSUPP.

The reason why I want it is:

% git grep EOPNOTSUPP|wc --lines
1071

Also, I'm hacking on `boot', trying to get unprivileged subhurds
running, and that means stubbing out some kernel interfaces.  So it
was either adding tons of stub functions to `boot' or doing a quick
MIG enhancement.

Justus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]