a warning on using SGI STL in a multi-threaded (omniORB) environment

Sai-Lai Lo S.Lo@orl.co.uk
Thu, 19 Feb 1998 11:19:49 GMT


--RMA//5TyOu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

A colleague of mine has be scratching his head on why his program fails on
a multiprocessor and not a uniprocessor solaris machine. Here is what he
discovered. 


--RMA//5TyOu
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit

Received: from pumpkin [158.124.64.14] 
	by shallot.cam-orl.co.uk with smtp (Exim 1.73 #1)
	id 0y5TtP-00049o-00; Thu, 19 Feb 1998 11:11:51 +0000
X-Sender: jnw@pumpkin
Message-ID: <Pine.SOL.3.95.980219110824.2044F-100000@pumpkin>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
From: "James [Wez] Weatherall" <jnw@orl.co.uk>
To: Sai Lai Lo <sll@orl.co.uk>
Subject: _PTHREADS
Date: Thu, 19 Feb 1998 11:11:51 +0000 (GMT)


Here you go, Sai Lai:

	Potential bug warning : When using the pthreads package (as with
omniORB2), in conjunction with the SGI Standard Template Library
implementation, it is important to set the _PTHREADS define, to ensure
correct concurrency control.  Failing to do so will not result in adverse
affects on most systems but can cause data corruption on multiprocessor
systems, if threads are accessing different STL structures concurrently.

	I think that summarises the problem.

James "Wez" Weatherall
--
Olivetti & Oracle Research Laboratory, Cambridge, UK.
Tel : Work - 343000


--RMA//5TyOu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



--RMA//5TyOu--