Denso RC5 Specifikace Strana 436

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 692
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 435
14-12
GIVESEM (Statement)
Function
Releases a task from waiting for a semaphore.
Format
GIVESEM <Semaphore ID>
Explanation
This statement releases the semaphore designated in <Semaphore ID>.
The system permits a restart of a process if there is one task which has the
semaphore designated in <Semaphore ID> when it is released. If there is a
task waiting for multiple semaphores, the system determines the execution
sequence using the queuing system designated by the CREATESEM
command when the semaphores were created.
Related Terms
CREATESEM, DELETESEM, FLUSHSEM, TAKESEM
Example
DEFINT Li1Li2Li3=1
Li1 = CREATESEM(Li3) '
Creates a semaphore with the queuing system designated in Li3
'and the semaphore ID obtained in Li1.
Li2 = CREATESEM(Li3) '
Creates a semaphore with the queuing system designated in Li3
'and the semaphore ID obtained in Li2.
TAKESEM Li1 'Obtains the semaphore designated in Li1.
TALESEM Li2100
'Obtains the semaphore designated in Li1. However, a timeout
'occurs after 100 ms.
RUN samp1
GIVESEM Li1
'Releases one task from the wait status which has the semaphore
'designated in Li1.
FLUSHSEM Li2
'Releases all tasks from the wait status which have the
semaphore
'designated in Li2.
DELETESEM Li1 '
Deletes the semaphore with the semaphore ID designated in Li1.
DELETESEM Li2 '
Deletes the semaphore with the semaphore ID designated in Li2.
Zobrazit stránku 435
1 2 ... 431 432 433 434 435 436 437 438 439 440 441 ... 691 692

Komentáře k této Příručce

Žádné komentáře