On Sat, Oct 12, 2002 at 04:49:25PM +0200, Dirk Roehrdanz wrote:
> Hello,
> 
> On  0, Philipp Mergenthaler <[EMAIL PROTECTED]> wrote:
> > On Sat, Oct 12, 2002 at 09:53:02AM -0400, Craig Rodrigues wrote:
> > > I just did a cvsup and rebuilt the world on my -CURRENT system.
> > > If I try to run the following program, I get a "Bad system call" coredump:
> > [...]
> > >   2660 a.out    CALL  aio_read(0xbfbffb88)
> > >   2660 a.out    RET   aio_read -1 errno 78 Function not implemented
> > 
> > Does your kernel configuration file contain the line "options VFS_AIO"?
> > I have a kernel (with this option)+world from yesterday, and aio_read works.

I do not have options VFS_AIO in my kernel config.

> you can get this functionality with "kldload aio"

Thanks, doing a kldload aio worked.

Where is stuff like this documented for end-users?

In this patch to /usr/src/sys/sys/syscalls.master that AIO was made 
a loadable module:

=======================================================================
   Revision 1.101 / (download) - annotate - [select for diffs], Sat Dec
   29 07:13:45 2001 UTC (9 months, 1 week ago) by alfred
   Branch: MAIN
   Changes since 1.100: +8 -8 lines
   Diff to previous 1.100 (colored)
Make AIO a loadable module.
=======================================================================

I am trying to port the ACE library ( http://www.cs.wustl.edu/~schmidt/ACE.html ) 
to FreeBSD-CURRENT, and it is very confusing that code in -STABLE
which compiled and worked, does not work the same way in
-CURRENT.  (ie. the code compiles, but it crashes because of a new kernel
option not being enabled or a module not being kldload'ed).

This will be very confusing to end-users of ACE on FreeBSD unless it is
documented.  Would the following patch be acceptable
for the aio_read man page?  I can supply a similar patch to the
other POSIX aio functions.

Thanks.

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
[EMAIL PROTECTED]
--- aio_read.2.orig     Sat Oct 12 11:42:52 2002
+++ aio_read.2  Sat Oct 12 11:55:57 2002
@@ -179,6 +179,33 @@
 .Fa iocb->aio_offset
 would be invalid.
 .El
+.Sh KERNEL OPTIONS
+The following kernel configuration option
+(see
+.Xr config 8 )
+is required
+.Pp
+.Dl "options VFS_AIO"
+.Pp
+If you do not want AIO support included in the kernel, but
+want to use it occasionally, do not add the
+.Dv VFS_AIO
+option.  Instead, load the
+.Nm aio
+module as desired:
+.Pp
+.Dl kldload aio
+.Pp
+.Sh SEE ALSO
+.Xr aio_cancel 2 ,
+.Xr aio_error 2 ,
+.Xr aio_return 2 ,
+.Xr aio_suspend 2 ,
+.Xr aio_waitcomplete 2 ,
+.Xr aio_write 2 ,
+.Xr config 8 ,
+.Xr kldload 8 ,
+.Xr kldunload 8
 .Sh STANDARDS
 The
 .Fn aio_read

Reply via email to