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

Re: [MiNT] This fight



V Čt, 11. 12. 2003 v 22:08, Frank Naumann píše:
> > Can't we just export the NatFeat interface so that drivers can use
> > whatever they need?
> 
> You confuse me. First you speak about adding syscalls, now you refering to
> driver modules. This are completly independant things.

I said 'drivers'. For example the sound driver (which is not yet a
module). Anyway, forget it for now (it's a discussion about
TSR-after-MiNT which is another major topic and would increase the
confusion even more).

> And I still don't understand what do you want todo.

I wanted to allow programmers to access the NatFeat interface as cleanly
as possible under FreeMiNT.

> As I said, sysinfo() is a bad eaxmple. sysinfo() is a simple and
> straightforward function and it works nice under TOS/MagiC too.
> But now please explain which NatFeat feature sysinfo() requires.

it could call the NF_NAME to obtain the host name.

> Syscalls are the only good way. But you must speak clearly which things
> you like to add, e.g. you must define the syscall and it's arguments

unsigned long nf_get_id(const char * feature_name);
long nf_call(unsigned long feature_id, ...);

These two calls are used for invoking the NatFeats from a C code. There
could be two similar syscalls added to FreeMiNT, or maybe just one that
would take additional parameter to distinguish between get_id and call
or perhaps even none syscall at all as most writers here don't need it
and don't want to bloat the kernel any more.

After all, we can implement the NatFeat shutdown even without NF kernel
support (in the separate XDD as we agreed) and drivers/applications
would simply continue using the cookie.

Petr