--- Gnu-Mach/device/dev_pager.c 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/device/dev_pager.c 2020/09/02 04:43:00 1.1.1.2 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1993-1989 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. */ @@ -333,7 +333,7 @@ kern_return_t device_pager_data_request( #ifdef lint protection_required++; -#endif lint +#endif /* lint */ if (device_pager_debug) printf("(device_pager)data_request: pager=%d, offset=0x%x, length=0x%x\n", @@ -352,9 +352,9 @@ kern_return_t device_pager_data_request( #if NORMA_VM object = vm_object_lookup(pager); -#else NORMA_VM +#else /* NORMA_VM */ object = vm_object_lookup(pager_request); -#endif NORMA_VM +#endif /* NORMA_VM */ if (object == VM_OBJECT_NULL) { (void) r_memory_object_data_error(pager_request, offset, length, @@ -375,16 +375,16 @@ kern_return_t device_pager_data_request( io_return_t result; panic("(device_pager)data_request: dev pager"); - + device = ds->device; mach_device_reference(device); dev_pager_deallocate(ds); - + /* * Package the read for the device driver. */ io_req_alloc(ior, 0); - + ior->io_device = device; ior->io_unit = device->dev_number; ior->io_op = IO_READ | IO_CALL; @@ -398,11 +398,11 @@ kern_return_t device_pager_data_request( ior->io_done = device_pager_data_request_done; ior->io_reply_port = pager_request; ior->io_reply_port_type = MACH_MSG_TYPE_PORT_SEND; - + result = (*device->dev_ops->d_read)(device->dev_number, ior); if (result == D_IO_QUEUED) return (KERN_SUCCESS); - + /* * Return by queuing IOR for io_done thread, to reply in * correct environment (kernel). @@ -429,7 +429,7 @@ boolean_t device_pager_data_request_done if (ior->io_residual) { if (device_pager_debug) printf("(device_pager)data_request_done: r: 0x%x\n",ior->io_residual); - bzero( (char *) (&ior->io_data[ior->io_count - + bzero( (char *) (&ior->io_data[ior->io_count - ior->io_residual]), (unsigned) ior->io_residual); } @@ -700,7 +700,7 @@ kern_return_t device_pager_data_unlock( { #ifdef lint memory_object++; memory_control_port++; offset++; length++; desired_access++; -#endif lint +#endif /* lint */ panic("(device_pager)data_unlock: called"); return (KERN_FAILURE); @@ -714,7 +714,7 @@ kern_return_t device_pager_lock_complete { #ifdef lint memory_object++; pager_request_port++; offset++; length++; -#endif lint +#endif /* lint */ panic("(device_pager)lock_completed: called"); return (KERN_FAILURE);