From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,e291a4dd07824524 X-Google-Attributes: gidf7344,public X-Google-Thread: 103376,e291a4dd07824524 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: VAX Ada Tasks and VMS Lock Manager Date: 1997/07/21 Message-ID: <1997Jul21.101731.1@eisner>#1/1 X-Deja-AN: 257980042 X-Nntp-Posting-Host: eisner.decus.org References: <01bc9579$39aaaf40$83ecced0@jpeterson> X-Nntp-Posting-User: KILGALLEN X-Trace: 869494660/14877 Organization: LJK Software Newsgroups: comp.lang.ada,comp.os.vms Date: 1997-07-21T00:00:00+00:00 List-Id: In article <01bc9579$39aaaf40$83ecced0@jpeterson>, "Jay and Cathy Peterson" writes: > I am currently debugging a VAX Ada (v1.5, if it makes a difference) They are well beyond V1.5 now, fixing many bugs, so it may matter to you. > application which contains roughly four tasks (plus the main task); one of > which is is used to synchronize access to a file. Additionally, I am using > the VMS Lock Manager (VMS version 5.4-2 -- I know; but it is what I have to They are well beyond V5.4-2 now, fixing many bugs, so it may matter to you. > work with) to assure the tasks don't walk over pertinent data; namely file > pointers I include in the controlled-access file. All of that to get to my > question: How do VAX Ada and VMS treat tasks for locking purposes? The > "traditional" use of SYS$ENQ and SYS$DEQ are to synchronize processes, I > know. If I issue a TASKING_ENQW, are the other tasks locked out, or do I The TASKING_ENQW would be the same as any other TASKING_* jacket for the "Wait" form of a system service -- other Ada tasks will be allowed to proceed. Regardless of how you access SYS$ENQ, it is important to realize that it doesn't have much regard for processes. You can deadlock a single process against itself or a single task against itself with the same ease with which you deadlock two processes in deadly embrace. The crucial element of VMS locking is the Lock ID returned by SYS$ENQ[W]. > need find another way of keeping the tasks from walking on each other? The > VAX Ada documentation at my disposal is silent on this issue, as far as I > can ascertain. Any insight into this situation would be appreciated. They are well beyond V1.5 now, augmenting the documentation, so maybe it did matter to you :-). You might do better with the current documentation, even if you have the older software. Regards, Larry Kilgallen