comp.lang.ada
 help / color / mirror / Atom feed
From: kst@sd.aonix.com (Keith Thompson)
Subject: Re: File/Record locking in Ada
Date: 1997/03/01
Date: 1997-03-01T00:00:00+00:00	[thread overview]
Message-ID: <E6CA9z.J8q@thomsoft.com> (raw)
In-Reply-To: 01bc259a$a035e850$fc00af88@godiva


In <01bc259a$a035e850$fc00af88@godiva> "Keith Allan Shillington" <keith@sd.aonix.com> writes:
> Hmmm.  That would be a protected type.

I don't think so.  A protected type can protect access to a resource
within a single (possibly multi-tasking) program, but not between
different programs running independently on the same system.  Since files
are shared across multiple independent programs, protected types won't
work for file locking.

What you really want is something like the POSIX_File_Locking package.
If you don't have a working implementation of that, you may be able
to interface to fcntl().  According to IEEE 1003.5, the Get_Lock,
Set_Lock, and Wait_To_Set_Lock routines correspond to fcntl(F_GETLK),
fcntl(F_SETLK), and fcntl(F_SETLKW), respectively.

-- 
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"Humor is such a subjective thing." -- Cartagia




  reply	other threads:[~1997-03-01  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-25  0:00 File/Record locking in Ada Stephen Godwin
1997-02-28  0:00 ` Keith Allan Shillington
1997-03-01  0:00   ` Keith Thompson [this message]
1997-03-03  0:00   ` David Emery
1997-03-03  0:00     ` Larry Kilgallen
1997-03-05  0:00   ` David Emery
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox