comp.lang.ada
 help / color / mirror / Atom feed
* special Ada functions
@ 1991-06-19 16:57 Claus Franzkowiak
  1991-06-19 21:08 ` J o s e D u a r t e
  0 siblings, 1 reply; 2+ messages in thread
From: Claus Franzkowiak @ 1991-06-19 16:57 UTC (permalink / raw)


I am looking for an Ada package that includes the following
functions/procedures:
   1. Record locking                     
   2. A function that takes a signal (character) from the keyboard without
      the usage of the return key.  For example:  I use only the up arrow key
      to move up the screen.

Also I would be interested if these functions could be written in Ada only
(no assembly).

I use an ATT 3B2 with the Verdix 5.7C Ada compiler under Unix.

Any hints will be appreciated.

1926 CCSG/SCDD
Claus Franzkowiak
Robins AFB
Warner Robins, GA 31098
912-926-7625
cfranz@wrdis01.af.mil

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: special Ada functions
  1991-06-19 16:57 special Ada functions Claus Franzkowiak
@ 1991-06-19 21:08 ` J o s e D u a r t e
  0 siblings, 0 replies; 2+ messages in thread
From: J o s e D u a r t e @ 1991-06-19 21:08 UTC (permalink / raw)



> I am looking for an Ada package that includes the following
> functions/procedures:
>   1. Record locking
>   2. A function that takes a signal (character) from the keyboard without
>      the usage of the return key.  For example:  I use only the up arrow key
>      to move up the screen.
>
> Also I would be interested if these functions could be written in Ada only
> (no assembly).
>
> I use an ATT 3B2 with the Verdix 5.7C Ada compiler under Unix.



For "1." above you can use the C library functions flock(),lockf(), or fcntl()
by making "pragma" interfaces to 'em...Locks set by lockf() aren't compatible
with locks set by flock(); however, they are compatible with locks set by
fcntl().


> Take a look at the man page for lockf(3c), that will tell you how to
> set and test the locks.  The locks will go across NFS just fine.
>
> The biggest thing to remember is that these locks are advisory (lockf),
> meaning that only processes that test for the lock on the file will be aware
> of the lock (so multiple copies of programs you write that use the lock
> won't collide), but other programs can still write to the file without
> even looking at the lock.

> If you want to turn the locks into mandatory locks that will prevent
> other processes from writing to the file, you need to set the file's
> mode bits to a special value.  This should be explained in the man
> page.

I'm pretty sure that "2." was previously discussed, but I didn't save the
solutions proposed by people.



Jose' D.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1991-06-19 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-06-19 16:57 special Ada functions Claus Franzkowiak
1991-06-19 21:08 ` J o s e D u a r t e

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