Page 1 of 1

Library interface in devices

PostPosted: Mon Apr 17, 2017 3:57 pm
by chris
Are the steps to add a library interface to a device documented anywhere?
Is there any example source code for a .device with a library interface?

Re: Library interface in devices

PostPosted: Tue Apr 18, 2017 1:17 am
by tonyw
The so-called "library" part is just the data header connecting the ".device" to the system. It enables Exec to start the driver at boot time and DOS to generate a "struct DeviceNode" in the DOS list. Handlers like file systems use a similar (but different) means of initialisation. The driver uses the library "open count" and other flags to make sure that it is not expunged while tasks are using it, much like a library.

I'll send you an example privately.

Re: Library interface in devices

PostPosted: Tue Apr 18, 2017 7:32 pm
by chris
Thanks Tony, appreciated.

I was wondering if I needed to regenerate the files with fdtrans, but wasn't sure how to even get a .device out of it (I'm using old source code and don't have the original files that were apparently passed through fdtrans).

Re: Library interface in devices

PostPosted: Wed Apr 26, 2017 12:51 am
by tonyw
Chris, did you get my PM? I don't know your email address, or at least I'm not sure which Chris I'm talking to ;)

Re: Library interface in devices

PostPosted: Wed Apr 26, 2017 10:45 am
by chris
tonyw wrote:Chris, did you get my PM? I don't know your email address, or at least I'm not sure which Chris I'm talking to ;)


No :( I had an empty deleted message, but nothing else.

Re: Library interface in devices

PostPosted: Thu Apr 27, 2017 1:09 am
by tonyw
Can you PM me your email address, then? I'll send you the archive I've made up for you.