summaryrefslogtreecommitdiffstats
path: root/sys/kern/link_aout.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/kern/link_aout.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/kern/link_aout.c')
-rw-r--r--sys/kern/link_aout.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c
index 1218e22..e410b20 100644
--- a/sys/kern/link_aout.c
+++ b/sys/kern/link_aout.c
@@ -193,14 +193,15 @@ static int
link_aout_load_file(linker_class_t lc, const char* filename, linker_file_t* result)
{
struct nameidata nd;
- struct proc* p = curproc; /* XXX */
+ struct thread *td = curthread; /* XXX */
+ struct proc *p = td->td_proc;
int error = 0;
int resid, flags;
struct exec header;
aout_file_t af;
linker_file_t lf = 0;
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename, p);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename, td);
flags = FREAD;
error = vn_open(&nd, &flags, 0);
if (error)
@@ -211,7 +212,7 @@ link_aout_load_file(linker_class_t lc, const char* filename, linker_file_t* resu
* Read the a.out header from the file.
*/
error = vn_rdwr(UIO_READ, nd.ni_vp, (void*) &header, sizeof header, 0,
- UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, p);
+ UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, td);
if (error)
goto out;
@@ -236,7 +237,7 @@ link_aout_load_file(linker_class_t lc, const char* filename, linker_file_t* resu
*/
error = vn_rdwr(UIO_READ, nd.ni_vp, (void*) af->address,
header.a_text + header.a_data, 0,
- UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, p);
+ UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, td);
if (error)
goto out;
bzero(af->address + header.a_text + header.a_data, header.a_bss);
@@ -267,8 +268,8 @@ link_aout_load_file(linker_class_t lc, const char* filename, linker_file_t* resu
out:
if (error && lf)
linker_file_unload(lf);
- VOP_UNLOCK(nd.ni_vp, 0, p);
- vn_close(nd.ni_vp, FREAD, p->p_ucred, p);
+ VOP_UNLOCK(nd.ni_vp, 0, td);
+ vn_close(nd.ni_vp, FREAD, p->p_ucred, td);
return error;
}
OpenPOWER on IntegriCloud