vfs_aio.c (34961) | vfs_aio.c (35256) |
---|---|
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.26 1998/03/28 11:50:04 dufault Exp $ | 16 * $Id: vfs_aio.c,v 1.27 1998/03/30 09:51:00 phk 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> --- 655 unchanged lines hidden (view full) --- 680 fdfree(mycp); 681 mycp->p_fd = NULL; 682 mycp->p_ucred = crcopy(mycp->p_ucred); 683 mycp->p_ucred->cr_uid = 0; 684 mycp->p_ucred->cr_ngroups = 1; 685 mycp->p_ucred->cr_groups[0] = 1; 686 687 /* | 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> --- 655 unchanged lines hidden (view full) --- 680 fdfree(mycp); 681 mycp->p_fd = NULL; 682 mycp->p_ucred = crcopy(mycp->p_ucred); 683 mycp->p_ucred->cr_uid = 0; 684 mycp->p_ucred->cr_ngroups = 1; 685 mycp->p_ucred->cr_groups[0] = 1; 686 687 /* |
688 * The daemon resides in it's own pgrp. | 688 * The daemon resides in its own pgrp. |
689 */ 690 enterpgrp(mycp, mycp->p_pid, 1); 691 692 /* 693 * Mark special process type 694 */ 695 mycp->p_flag |= P_SYSTEM|P_KTHREADP; 696 --- 61 unchanged lines hidden (view full) --- 758 * the other process that it was acting on behalf of. 759 */ 760 if (tmpvm != myvm) { 761 vmspace_free(tmpvm); 762 } 763 /* 764 * Disassociate from previous clients file descriptors, and 765 * associate to the new clients descriptors. Note that | 689 */ 690 enterpgrp(mycp, mycp->p_pid, 1); 691 692 /* 693 * Mark special process type 694 */ 695 mycp->p_flag |= P_SYSTEM|P_KTHREADP; 696 --- 61 unchanged lines hidden (view full) --- 758 * the other process that it was acting on behalf of. 759 */ 760 if (tmpvm != myvm) { 761 vmspace_free(tmpvm); 762 } 763 /* 764 * Disassociate from previous clients file descriptors, and 765 * associate to the new clients descriptors. Note that |
766 * the daemon doesn't need to worry about it's orginal | 766 * the daemon doesn't need to worry about its orginal |
767 * descriptors, because they were originally freed. 768 */ 769 if (mycp->p_fd) 770 fdfree(mycp); 771 mycp->p_fd = fdshare(userp); 772 curcp = userp; 773 } 774 --- 136 unchanged lines hidden (view full) --- 911 } 912 } 913 } 914 } 915} 916 917/* 918 * Create a new AIO daemon. This is mostly a kernel-thread fork routine. | 767 * descriptors, because they were originally freed. 768 */ 769 if (mycp->p_fd) 770 fdfree(mycp); 771 mycp->p_fd = fdshare(userp); 772 curcp = userp; 773 } 774 --- 136 unchanged lines hidden (view full) --- 911 } 912 } 913 } 914 } 915} 916 917/* 918 * Create a new AIO daemon. This is mostly a kernel-thread fork routine. |
919 * The AIO daemon modifies it's environment itself. | 919 * The AIO daemon modifies its environment itself. |
920 */ 921static int 922aio_newproc() 923{ 924 int error; 925 struct rfork_args rfa; 926 struct proc *p, *np; 927 --- 1123 unchanged lines hidden --- | 920 */ 921static int 922aio_newproc() 923{ 924 int error; 925 struct rfork_args rfa; 926 struct proc *p, *np; 927 --- 1123 unchanged lines hidden --- |