Fix a problem when creating a new kernel thread. In some cases, aio_read

or aio_write can return the pid of the new thread.  This is due to the
way that return values from system calls being passed by side-effect in
the proc structure now.  This commit fixes the problem with aio_read and
aio_write.
This commit is contained in:
John Dyson 1997-12-01 18:41:08 +00:00
parent 1b0493988c
commit e499ed6f86

View File

@ -13,7 +13,7 @@
* bad that happens because of using this software isn't the responsibility * bad that happens because of using this software isn't the responsibility
* of the author. This software is distributed AS-IS. * of the author. This software is distributed AS-IS.
* *
* $Id: vfs_aio.c,v 1.16 1997/11/30 23:21:08 dyson Exp $ * $Id: vfs_aio.c,v 1.17 1997/12/01 07:01:45 dyson Exp $
*/ */
/* /*
@ -1350,6 +1350,7 @@ _aio_aqueue(struct proc *p, struct aiocb *job, struct aio_liojob *lj, int type)
num_aio_resv_start++; num_aio_resv_start++;
if ((error = aio_newproc()) == 0) { if ((error = aio_newproc()) == 0) {
num_aio_resv_start--; num_aio_resv_start--;
p->p_retval[0] = 0;
goto retryproc; goto retryproc;
} }
num_aio_resv_start--; num_aio_resv_start--;