Subject: Question about sa_upcall_userret() and sa_makeupcalls()
To: None <tech-kern@netbsd.org>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 05/17/2007 21:23:12
--FkmkrVfFsRoUs1wW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

As some of you may have noticed on source-changes, I'm working on fixing=20
up Scheduler Activations. Note: all of this is happening on the=20
wrstuden-fixsa branch, which is a branch off of netbsd-4!

So I want to make sure I understand something about sa_upcall_userret()=20
and how it passes out upcalls.

sa_upcall_userret() gets called when userret() is about to go back to=20
userland & has noticed there are upcalls.

It will do a number of things, then it will call sa_makeupcalls() once for=
=20
each upcall. Each call to sa_makeupcalls grabs a stack that libpthread=20
gave us, and builds an upcall on it. We shove LOTS of unblocked upcalls=20
into one upcall event.

What I'm not sure about is what actually causes the upcalls to get=20
processed. I see where we set the stack pointer and pc in the frame on=20
return. So I readily see how ONE of these upcall stacks will get run. But=
=20
what causes any others we generate to also run?

Thanks!

Take care,

Bill

--FkmkrVfFsRoUs1wW
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGTSowWz+3JHUci9cRAssnAKCLro4MYkUPrUAzizRtjScPDNDVOwCcCT9g
K/ObaAXsVh2rEfW8HWSI23U=
=Ro3w
-----END PGP SIGNATURE-----

--FkmkrVfFsRoUs1wW--