Message-Id: <3.0.16.19980214230158.5057866a@hem1.passagen.se> Date: Sat, 14 Feb 1998 23:02:01 -0500 To: "A. Sinan Unur" From: Peter Palotas Subject: Re: Thread safe programs. Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 07.02 1998-02-14 -0500, you wrote: >>Peter Palotas wrote: >>>I was just wondering if someone could tell me what a thread-safe program >>>includes, i.e. how one would make a program/library thread safe. I know this >>>isn't really a DJGPP specific question, but isn't it an important task when >>>porting (and well, there is multithreading libs for DJGPP too). >>> >>>Ofcourse not using any global or static data would make a program threadsafe >>>(or?), but what if you are writing a library that NEEDS static or global >>>data!? Can threads be disabled during the execution of a specific functionin >>>all multi-threading systems? >>> >>>Very greatful for a reply to this! >> >> At 20.08 1998-02-13 -0500, you wrote: >> >IIRC, there was a detailed discussion on this in >> >comp.lang.c.moderated a >> >short time ago. at the time, i found it quite informative. you might >> >want to give dejanews a try. >> >> Where would I find old messages form this newsgroup? > >as i said, you might be able to find the thread using dejanews: >www.dejanews.com. I tried this, but I wasn't able to find any information about wether or not it is a portable solution to assume that there is some way to disable threads on all platforms from within the code, hence defining something like "#define DISABLE_THREADS some_function();" and "#define ENABLE_THREADS some_other_function();". So if anyone could give me a good answer to this, I would be really greatful, because my program really *needs* a global linked list, and I want to know if I can somehow make sure it is thread safe on any multi-threading platform. Very greatful for a reply! -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ****************************************************** * A brief description of DJGPP: * * NEVER BEFORE HAVE SO FEW DONE SO MUCH FOR SO MANY! * ******************************************************