Date: Tue, 16 Sep 1997 11:39:39 +0200 (CEST) From: Mikael Karpberg <karpen@ocean.campus.luth.se> To: dyson@FreeBSD.ORG Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: What is wrong with this snipet? Message-ID: <199709160939.LAA04839@ocean.campus.luth.se> In-Reply-To: <199709160858.DAA00240@dyson.iquest.net> from "John S. Dyson" at "Sep 16, 97 03:58:33 am"
next in thread | previous in thread | raw e-mail | index | archive | help
According to John S. Dyson: > Mikael Karpberg said: [...about rfork RFMEM...] > > What am I missing? Could you make a short example of a use for this? > > > 1) Have a new stack ready > 2) Push the address of the start of the thread > onto the new stack. > 3) call rfork with RFMEM and other flags. > 4a) In the child, immediately set the stack pointer to the > new one that was prepared in the parent. Issue a return > instruction. > 4b) In the parent, continue on. > > The key to this working is to avoid dependence on the stack in the > child until the new stack pointer is loaded. [...] Exactly the kind of answer i was looking for. Thanx. /Mikael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709160939.LAA04839>