From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 2 Dec 2005 15:46:04 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] 9con in Madrid? In-Reply-To: <50D14CA6-11E3-4300-9F84-F92EF42B87D2@telus.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2186708a75eab646a7016140a1f91784@plan9.bell-labs.com> <439096F7.2020900@lanl.gov> <4390AE03.9060606@village.com> <50D14CA6-11E3-4300-9F84-F92EF42B87D2@telus.net> Topicbox-Message-UUID: b60c3d5e-ead0-11e9-9d60-3106f5b1d025 > Offtopic: (on topic?) I've been playing with P9P, getting libdraw to > open applications applications in the same window they were started > it. I've got it working except for the dreaded X11-is-single- > threaded race condition. Can you explain the race? > Within a single proc it's easy to wrap the > offending calls in a lock, but I'm looking at the case where > different procs need to use the same window. > It seems that all I > need is a nice, cheap, inter-process lock. What's the most portable > answer? Is it inter-process but still one program? What are the specific code pieces that need to be interlocked? The multi-process X apps in p9p each use their own display to avoid most of the races. Russ