Bug in kse_switchin()?
Mike Makonnen
mtm at identd.net
Thu Sep 23 08:08:50 PDT 2004
On Thu, Sep 23, 2004 at 04:17:18PM +0400, Andrew Belashov wrote:
> Daniel Eischen wrote:
> >Wouldn't you also see same behavior (bugs) in other things, like
> >getcontext(), setcontext(), and swapcontext() (kern_context.c)?
>
> No. uap structure is not used after set_mcontext().
So, the attached change to thr_create should work as far as
libthr is concerned then?
BTW, have you tried libthr on sparc64, and if so how does it work?
Cheers.
--
Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon !
-------------- next part --------------
Index: sys/kern/kern_thr.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_thr.c,v
retrieving revision 1.27
diff -u -r1.27 kern_thr.c
--- sys/kern/kern_thr.c 7 Sep 2004 07:04:47 -0000 1.27
+++ sys/kern/kern_thr.c 23 Sep 2004 15:06:04 -0000
@@ -76,9 +76,11 @@
int error;
struct ksegrp *kg, *newkg;
struct proc *p;
+ int flags;
p = td->td_proc;
kg = td->td_ksegrp;
+ flags = uap->flags;
if ((error = copyin(uap->ctx, &ctx, sizeof(ctx))))
return (error);
@@ -158,7 +160,7 @@
sched_fork_thread(td, newtd);
TD_SET_CAN_RUN(newtd);
- if ((uap->flags & THR_SUSPENDED) == 0)
+ if ((flags & THR_SUSPENDED) == 0)
setrunqueue(newtd, SRQ_BORING);
mtx_unlock_spin(&sched_lock);
More information about the freebsd-sparc64
mailing list