🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1

Re: Locking & forbiding

#1
From: Edgar LeBel
Date: Thu, 15 Jun 2023 17:38
51 lines
2850 bytes
In article <1aY.02kv33t701@amdahl.uts.amdahl.com> dwl10@amdahl.uts.amdahl.com (Dave Lowrey) writes:
>In article <108749@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes:
>>I wrote : 
>>>Why don't you use SetWindowTitle()?
>>
>>In article <d2YG02GD32Hm01@amdahl.uts.amdahl.com> (Dave Lowrey) writes:
>>>I need to get the address of the current title, as well as
>>>setting a new title.
>>>
>>>So I guess I am asking if it is safe to access this info
>>>without any locking.
>>
>>Hmmmm, why do I get the feeling that you aren't doing something that 
>>one my consider "normal" programming practice? :-) 
>
>That's why I am asking these questions. I would like to remain
>"normal" (Whatever that means). :-)
>
>>
>>So to be completely blunt and open about this :
>>
>>       You opened a window, so you have a pointer to the window...
>
>You assume wrong. The "shell" has opened the window, so I don't
>own it.
>
>The program I am writing puts the Current Directory into the
>title bar. It works now, without ANY locking, but I suspect that
>I am inviting trouble by not preventing other processes from accessing
>the data.
>
>-- 
>"What is another word  |  Dave Lowrey    | [The opinions expressed MAY be
> for 'Thesaurus'?"     |  Amdahl Corp.   | those of the author and are not
>                       |  Houston, Texas | necessarily those of his
>   Steven Wright       |  amdahl!dwl10   | employer]   (`nuff said!)


In my own shell I have the current directory in the title bar, which I
obtained "normally" without any locking.  Just send an ACTION_DISK_INFO
packet to intuition and get the window structure pointer from the
id_VolumeNode field of the InfoData structure in the reply.  

I got this method from Chris Siebenman (thanks Chris) and it's been working
for two years.  If you would like a code fragment, send me mail.

--

Hobie Orris
impersonating Edgar Lebel
edgar@csri.utoronto.edu
Technical Details
Message-ID: <1989Jun12.085219.3799@jarvis.csri.toronto.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf9.newsdeef.eu!news.novalink.us!.POSTED.2600:8800:3600:135:baca:3aff:fe7c:dafa!utzoo!utgpu!jarvis.csri.toronto.edu!dundas.csri!edgar
References: <7cBq029532iy01@amdahl.uts.amdahl.com> <108333@sun.Eng.Sun.COM> <d2YG02GD32Hm01@amdahl.uts.amdahl.com> <108749@sun.Eng.Sun.COM> <1aY.02kv33t701@amdahl.uts.amdahl.com>

Show Full Headers
Complete Article Headers
Message-ID: <1989Jun12.085219.3799@jarvis.csri.toronto.edu>
Subject: Re: Locking & forbiding
Date: Thu, 15 Jun 2023 17:38:02 +0000
From: edgar@csri.toronto.edu (Edgar LeBel)
References: <7cBq029532iy01@amdahl.uts.amdahl.com> <108333@sun.Eng.Sun.COM> <d2YG02GD32Hm01@amdahl.uts.amdahl.com> <108749@sun.Eng.Sun.COM> <1aY.02kv33t701@amdahl.uts.amdahl.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf9.newsdeef.eu!news.novalink.us!.POSTED.2600:8800:3600:135:baca:3aff:fe7c:dafa!utzoo!utgpu!jarvis.csri.toronto.edu!dundas.csri!edgar
Newsgroups: comp.sys.amiga.tech
Organization: University of Toronto, CSRI
Injection-Date: Thu, 15 Jun 2023 17:38:02 -0000 (UTC)
Injection-Info: novalink.us; posting-host="2600:8800:3600:135:baca:3aff:fe7c:dafa";