vfs_aio.c (df8abd0bb91dd5686111bc0d6ac9f65aa3e66af9) vfs_aio.c (9c8b8baa38c9a8135d7602f127cb0c735010837d)
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
16 * $Id: vfs_aio.c,v 1.52 1999/06/26 02:46:05 mckusick Exp $
16 * $Id: vfs_aio.c,v 1.53 1999/06/30 15:33:36 peter Exp $
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

--- 206 unchanged lines hidden (view full) ---

231static void aio_onceonly(void *) ;
232static int aio_free_entry(struct aiocblist *aiocbe);
233static void aio_process(struct aiocblist *aiocbe);
234static int aio_newproc(void) ;
235static int aio_aqueue(struct proc *p, struct aiocb *job, int type) ;
236static void aio_physwakeup(struct buf *bp);
237static int aio_fphysio(struct proc *p, struct aiocblist *aiocbe, int type);
238static int aio_qphysio(struct proc *p, struct aiocblist *iocb);
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

--- 206 unchanged lines hidden (view full) ---

231static void aio_onceonly(void *) ;
232static int aio_free_entry(struct aiocblist *aiocbe);
233static void aio_process(struct aiocblist *aiocbe);
234static int aio_newproc(void) ;
235static int aio_aqueue(struct proc *p, struct aiocb *job, int type) ;
236static void aio_physwakeup(struct buf *bp);
237static int aio_fphysio(struct proc *p, struct aiocblist *aiocbe, int type);
238static int aio_qphysio(struct proc *p, struct aiocblist *iocb);
239static void aio_daemon(const void *uproc);
239static void aio_daemon(void *uproc);
240
241SYSINIT(aio, SI_SUB_VFS, SI_ORDER_ANY, aio_onceonly, NULL);
242
243static vm_zone_t kaio_zone=0, aiop_zone=0,
244 aiocb_zone=0, aiol_zone=0, aiolio_zone=0;
245
246/*
247 * Startup initialization

--- 345 unchanged lines hidden (view full) ---

593
594}
595
596/*
597 * The AIO daemon, most of the actual work is done in aio_process,
598 * but the setup (and address space mgmt) is done in this routine.
599 */
600static void
240
241SYSINIT(aio, SI_SUB_VFS, SI_ORDER_ANY, aio_onceonly, NULL);
242
243static vm_zone_t kaio_zone=0, aiop_zone=0,
244 aiocb_zone=0, aiol_zone=0, aiolio_zone=0;
245
246/*
247 * Startup initialization

--- 345 unchanged lines hidden (view full) ---

593
594}
595
596/*
597 * The AIO daemon, most of the actual work is done in aio_process,
598 * but the setup (and address space mgmt) is done in this routine.
599 */
600static void
601aio_daemon(const void *uproc)
601aio_daemon(void *uproc)
602{
603 int s;
604 struct aioproclist *aiop;
605 struct vmspace *myvm;
606 struct proc *mycp;
607
608 /*
609 * Local copies of curproc (cp) and vmspace (myvm)

--- 1399 unchanged lines hidden ---
602{
603 int s;
604 struct aioproclist *aiop;
605 struct vmspace *myvm;
606 struct proc *mycp;
607
608 /*
609 * Local copies of curproc (cp) and vmspace (myvm)

--- 1399 unchanged lines hidden ---