--- Gnu-Mach/device/io_req.h 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/device/io_req.h 2020/09/02 04:45:33 1.1.1.3 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ /* * IO request element, queued on device for delayed replies. */ +typedef struct io_req *io_req_t; struct io_req { struct io_req * io_next; /* next, ... */ struct io_req * io_prev; /* prev pointers: link in done, @@ -65,11 +67,11 @@ struct io_req { #define io_data io_un.data long io_count; /* amount requested */ - long io_alloc_size; /* amount allocated */ + vm_size_t io_alloc_size; /* amount allocated */ long io_residual; /* amount NOT done */ io_return_t io_error; /* error code */ - boolean_t (*io_done)(); /* call when done - returns TRUE - if IO really finished */ + /* call when done - returns TRUE if IO really finished */ + boolean_t (*io_done)(io_req_t); struct ipc_port *io_reply_port; /* reply port, for asynchronous messages */ mach_msg_type_name_t io_reply_port_type; @@ -84,7 +86,6 @@ struct io_req { number */ long io_rectotal; /* total number of blocks to move */ }; -typedef struct io_req * io_req_t; /* * LOCKING NOTE: Operations on io_req's are in general single threaded by @@ -121,10 +122,10 @@ typedef struct io_req * io_req_t; /* * Standard completion routine for io_requests. */ -void iodone(/* io_req_t */); +void iodone(io_req_t); /* - * Macros to allocate and free IORs - will convert to zones later. + * Macros to allocate and free IORs - will convert to caches later. */ #define io_req_alloc(ior,size) \ MACRO_BEGIN \ @@ -136,6 +137,6 @@ void iodone(/* io_req_t */); (kfree((vm_offset_t)(ior), sizeof(struct io_req))) -zone_t io_inband_zone; /* for inband reads */ +struct kmem_cache io_inband_cache; /* for inband reads */ -#endif _IO_REQ_ +#endif /* _IO_REQ_ */