[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Context switching woes
- To: email@example.com
- Subject: Re: Context switching woes
- From: Erik <firstname.lastname@example.org>
- Date: Sun, 18 Feb 2001 11:48:57 -0600
- Delivered-To: mailing list email@example.com
- Delivery-Date: Sun, 18 Feb 2001 12:49:29 -0500
- Mailing-List: contact firstname.lastname@example.org; run by ezmlm
- Reply-To: email@example.com
> I'm getting a *lot* of support from MS on this issue, but I'd better check
> the details for the Linux version of the game...
> I'm trying to avoid a future problem of random context switches when it
> comes to critical sections of the code. The Win32 API has some useful
> functions to manage this, which apparently operate on some x86 instructions
> (I've even got permission from MS to disassemble their routines and do a
> port to Linux, how funky is that?)
switches... between threads inside of a single app, or between other apps?
I don't think it'll be possible to do the latter, but the former can be done
fairly effectively with mutex locks and/or semaphores.
> Before I do this, however, I was wondering what the critical sections
> functions in pthreads are like? (MS also tells me that Win32 has true
> pthread support, it's part of the undocumented APIs...). If there is decent
> support, I can use that to save me plenty of hard work in the long run.
probably the best way to get a good solid view of hows pthreads work would
be to download the pthread addon for libc and look through the source. I d'no
if you can afford that kinda time tho :)
> Anyone willing to point me in the right direction?
> (if you can get over the shock of MS helping someone with Linux development,
> apparently they've written a book on getting Win32 programs ported to Linux
> and vice-versa...)
very frightening. Almost like they're conceeding that linux is here to stay as an
important desktop os and trying to make it so they won't be pushed to the wayside?
I d'no, that gets into various economic and political things, I'm just a lazy code
> The Infamous Mark 'Nurgle' Collins
> Lead Author - 'Linux Game Programming' (ISBN: 0-7615-3255-2)
> WWW: http://www.thisisnurgle.org.uk Mobile: +44 7761 774 152
> Email: firstname.lastname@example.org Spam: email@example.com
-Erik <firstname.lastname@example.org> [http://math.smsu.edu/~br0ke]
The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org