]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/aio_kern.h
xnu-792.21.3.tar.gz
[apple/xnu.git] / bsd / sys / aio_kern.h
index 03555f39ae4c34dff9548a97a998d96358933fa6..4b030a1039d6e6a5eaaa77029903cd3f04dc1a52 100644 (file)
@@ -1,16 +1,19 @@
 /*
  * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
  *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
  * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
+ * 
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
@@ -20,7 +23,7 @@
  * Please see the License for the specific language governing rights and
  * limitations under the License.
  * 
- * @APPLE_LICENSE_HEADER_END@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
  */
 /* 
  *     File:   sys/aio_kern.h
@@ -41,15 +44,15 @@ struct aio_workq_entry
 {
        TAILQ_ENTRY( aio_workq_entry )  aio_workq_link;
        struct proc                                             *procp;         /* user proc that queued this request */
-       struct aiocb                                    *uaiocbp;       /* pointer passed in from user land */
-       struct aiocb                                    *fsyncp;        /* not NULL means this request must complete */
+       user_addr_t                                             uaiocbp;        /* pointer passed in from user land */
+       user_addr_t                                             fsyncp;         /* not NULL means this request must complete */
                                                                                                /* before an aio_fsync call can proceed. */
        vm_map_t                                                aio_map;        /* user land map we have a reference to */
-       ssize_t                                                 returnval;      /* return value from read / write request */    
+       user_ssize_t                                    returnval;      /* return value from read / write request */    
        int                                                             errorval;       /* error value from read / write request */
        int                                                             flags;          
        long                                                    group_tag;      /* identifier used to group IO requests */
-       struct aiocb                                    aiocb;          /* copy of aiocb from user land */
+       struct user_aiocb                               aiocb;          /* copy of aiocb from user land */
 };
 typedef struct aio_workq_entry aio_workq_entry;
 
@@ -69,11 +72,27 @@ typedef struct aio_workq_entry aio_workq_entry;
                                                                        /*      waiting for one or more active IO requests to */
                                                                        /*      complete */
 
+/*
+ * Prototypes
+ */
+
+__private_extern__ void                
+_aio_close(struct proc *p, int fd);
+
+__private_extern__ void                
+_aio_exit(struct proc *p);
+
+__private_extern__ void                
+_aio_exec(struct proc *p);
+
+__private_extern__ void                
+_aio_create_worker_threads(int num);
+
+__private_extern__ void                
+aio_init(void);
 
-__private_extern__ void                _aio_close( struct proc *p, int fd );
-__private_extern__ void                _aio_exit( struct proc *p );
-__private_extern__ void                _aio_exec( struct proc *p );
-__private_extern__ void                _aio_create_worker_threads( int num );
+task_t                                         
+get_aiotask(void);
 
 #endif /* KERNEL */