Denso RC5 Dokumentacja Strona 433

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 692
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 432
Chapter 14 Multitasking Control Statements
14-9
PROGRAM PRO1
i1 = CREATESEM(0)
RUN PRO2
RUN PRO3
END
PROGRAM PRO2
TAKESEM i1
.
.
.
GIVESEM i1
END
PROGRAM PRO3
TAKESEM i1
.
.
.
GIVESEM i1
END
(3) Countermeasure when an infinite wait occurs.
To get out of this status, run a calling program (ipro1 in this example) after
stopping the program (pro3 in this example) that is in an infinite wait
status.
(4) Observe the following for proper use of this statement.
Do not rewrite the ID of a semaphore that is in a wait status. Especially
observe the following two points.
1) Create a semaphore that uses the same variable number only once as
long as it is not clearly deleted.
2) Do not use a variable which controls a semaphore ID for other
purposes.
Przeglądanie stron 432
1 2 ... 428 429 430 431 432 433 434 435 436 437 438 ... 691 692

Komentarze do niniejszej Instrukcji

Brak uwag