|
\begin{algorithmic}[1]
|
|
\State \Comment{Le sémaphore $m$ existe et a été initialisé à 1}
|
|
\Procedure{}{} \Comment{procédure exécutée par de multiples \en{threads}}
|
|
\State $\Call{P}{m}$
|
|
\State ... \Comment{section critique}
|
|
\State $\Call{V}{m}$
|
|
\EndProcedure
|
|
\end{algorithmic}
|