[comp.sys.amiga.tech] Procure

navas@cory.Berkeley.EDU (David C. Navas) (10/05/89)

In article <8084@cbmvax.UUCP> mks@cbmvax.UUCP (Michael Sinz - CATS) writes:
>Unfortunately, the AddSemaphore() call is broken in the V33/V34 kickstart.

Umm, okay, as long as we're on the topic...  Does anyone know how well (or if)
Procure() and Vacate() work (I'll be using them pretty darn soon now.)

Thank you
>|      /// Michael Sinz -- CATS/Amiga Software Engineer                |
>|     ///  PHONE 215-431-9422  UUCP ( uunet | rutgers ) !cbmvax!mks    |

David Navas
navas@CORY.BERKELEY.EDU

mks@cbmvax.UUCP (Michael Sinz - CATS) (10/06/89)

In article <18004@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>In article <8084@cbmvax.UUCP> mks@cbmvax.UUCP (Michael Sinz - CATS) writes:
  [Deleted...]
>Umm, okay, as long as we're on the topic...  Does anyone know how well (or if)
>Procure() and Vacate() work (I'll be using them pretty darn soon now.)

Procure() and Vacate() work great.  However, you should know that there is
more system and programmer overhead in using them over ObtainSemaphore()
and ReleaseSemaphore()...  The AddSemaphore() work-around is perfectly
legal and "recommended"

>
>David Navas
>navas@CORY.BERKELEY.EDU

/----------------------------------------------------------------------\
|      /// Michael Sinz -- CATS/Amiga Software Engineer                |
|     ///  PHONE 215-431-9422  UUCP ( uunet | rutgers ) !cbmvax!mks    |
|    ///                                                               |
|\\\///          When people are free to do as they please,            |
| \XX/                they usually imitate each other.                 |
\----------------------------------------------------------------------/

navas@cory.Berkeley.EDU (David C. Navas) (10/07/89)

In article <8109@cbmvax.UUCP> mks@cbmvax.UUCP (Michael Sinz - CATS) writes:
>In article <18004@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>>In article <8084@cbmvax.UUCP> mks@cbmvax.UUCP (Michael Sinz - CATS) writes:
>  [Deleted...]
>>Umm, okay, as long as we're on the topic...  Does anyone know how well (or if)
>>Procure() and Vacate() work (I'll be using them pretty darn soon now.)
>
>Procure() and Vacate() work great.  However, you should know that there is
>more system and programmer overhead in using them over ObtainSemaphore()
>and ReleaseSemaphore()...  The AddSemaphore() work-around is perfectly

hmmm, I'm sure it is.  I'll mostly be using signal semaphores -- but there
is no way to wait on multiple semaphores (that I know of), so it's back
to message-based sems.  I'm going to be sem'ing disk drive access for
my Jazzbench programs, and I *need* a way to know when one of several drives
becomes available (read:  fewer krunch-krunch-groin-groin!!)

if anyone knows of a better way to do this, I'm open for suggestions.

David Navas
navas@cory.berkeley.edu

jesup@cbmvax.UUCP (Randell Jesup) (10/10/89)

In article <18069@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>hmmm, I'm sure it is.  I'll mostly be using signal semaphores -- but there
>is no way to wait on multiple semaphores (that I know of), so it's back
>to message-based sems.  I'm going to be sem'ing disk drive access for
>my Jazzbench programs, and I *need* a way to know when one of several drives
>becomes available (read:  fewer krunch-krunch-groin-groin!!)
>
>if anyone knows of a better way to do this, I'm open for suggestions.

	ObtainSemaphoreList()/ReleaseSemaphoreList().

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"

navas@cory.Berkeley.EDU (David C. Navas) (10/10/89)

In article <8127@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>In article <18069@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>>if anyone knows of a better way to do this, I'm open for suggestions.
>
>	ObtainSemaphoreList()/ReleaseSemaphoreList().

If that's true, then somebody is confused.  Doesn't OSList() wait until it
gets the *whole* list of semaphores.  I only want to wait until *one* of them
is available.

>-- 
>Randell Jesup, Keeper of AmigaDos, Commodore Engineering.

David Navas
navas@cory.berkeley.edu

jesup@cbmvax.UUCP (Randell Jesup) (10/11/89)

In article <18139@pasteur.Berkeley.EDU> navas@cory.Berkeley.EDU.UUCP (David C. Navas) writes:
>In article <8127@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>>	ObtainSemaphoreList()/ReleaseSemaphoreList().
>
>If that's true, then somebody is confused.  Doesn't OSList() wait until it
>gets the *whole* list of semaphores.  I only want to wait until *one* of them
>is available.

	Ah, I misunderstood the question.  ObtainSemaphoreList waits till all
the semaphores are available.  Try the message-based semaphores (or start
one task/semaphore, and have the task notify the main process when it gets
the semaphore - a real pain).

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"