Skip to main content
gamedev.net
🔒 Locked

Critical Sections

Started by Brobanx Jun 10, 2002 at 10:56 PM 4 replies 250+ views
Original Post
Brobanx
Brobanx
I''m in the process of writing my own multi-thread library for Win32. Right now I''m using critical sections in my code by using the Win32 CRITICAL_SECTION object and related functions. I''m wondering if there''s a way to use critical sections in my code without using the Win32 libraries. Any info would be much appreciated.
Shannon Barber
Shannon Barber
nope
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
DerekSaw
DerekSaw
quote:
Original post by Brobanx
I''m in the process of writing my own multi-thread library for Win32....my code without using the Win32 libraries....


If you program in Win32... you have to use its thingie.
"after many years of singularity, i'm still searching n the event horizon" o
JonStelly
JonStelly
You really wouldn''t want to do this yourself. Synchronization can be completely different between single and multi-processor machines. What''s the problem with using the OS supplied functions? Or are you just curious for curiosity''s sake?
Dirge
Dirge
lookup _beginthread() in MSDN.
I believe thats the call. you could use the standard c++ implementation. I believe that is the same in the APPLE and LINUX versions.
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
Gorg
Gorg
You can also use pthreads. It''s supported on most *nix platform and windows. So it''s portable. But obviously the windows implementation is done by using Win32 threads functions.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.