Re: last minute fix for gnumach
Marcus Brinkmann <[email protected]>
| Newsgroups | gmane.os.hurd.devel.readers |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 22, 2002 at 08:39:11PM -0400, Roland McGrath wrote: > If you can try this and test that it actually works (halts and comes up > again properly), then go ahead and put it in. model_dep.c is a vaguely > reasonable place for the function. Ok. Harald tested it, and I will do the same right now. The one thing we can not really answer is that if the memory barrier is needed there. I took this line of code from Linux, but of course the Linux code is a bit different (it disables interrupts while checking if it needs to be rescheduled, before doing a hlt with memory barrier). I thought maybe that it is needed for SMP, but I can't see a reason. The three variables checked in the while() condition in sched_prim.c are all volatile, and as such all accesses to them should be synchronized properly (not within, but for each individual variable). It would take me ages to find out what other changes in the Linux kernel were made when this memory barrier was added, if there is hope to find this information at all. So I thought I'd better ask you. Any clue? Thanks, Marcus -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [email protected] Marcus Brinkmann GNU http://www.gnu.org [email protected] [email protected] http://www.marcus-brinkmann.de