X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=ipc.tex;h=91c6ff352dd5c67943014b4b149ac8e0a21dba32;hp=d22c3ba381bcab3aadcce723e927fef2a43c28f0;hb=9562f11ab8163e83cbd02c6dffa342629e230ca5;hpb=d2a164e13fb0e9c27585a3b50de57b08e966fd02 diff --git a/ipc.tex b/ipc.tex index d22c3ba..91c6ff3 100644 --- a/ipc.tex +++ b/ipc.tex @@ -4449,10 +4449,10 @@ corrente. \label{fig:ipc_posix_sem_shm_message_server_handler} \end{figure} -Prima della stampa del messaggio invece si deve aquisire il semaforo +Prima della stampa del messaggio invece si deve acquisire il semaforo (\texttt{\small 31--34}) per evitare accessi concorrenti alla stringa da parte del programma di modifica. Una volta eseguita la stampa (\texttt{\small 41}) -il semforo dovrà essere rilasciato (\texttt{\small 42--45}). Il passo finale +il semaforo dovrà essere rilasciato (\texttt{\small 42--45}). Il passo finale (\texttt{\small 46}) è attendere per un secondo prima di eseguire da capo il ciclo. @@ -4461,7 +4461,7 @@ il break da tastiera (\texttt{C-c}), che corrisponde all'invio del segnale \const{SIGINT}, per il quale si è installato (\texttt{\small 10}) una opportuna funzione di gestione, riportata in fig.~\ref{fig:ipc_posix_sem_shm_message_server_handler}. La funzione è molto -semplice e richiame le funzioni di rimozione sia per il segmento di memoria +semplice e richiama le funzioni di rimozione sia per il segmento di memoria condivisa che per il semaforo, garantendo così che possa essere riaperto ex-novo senza errori in un futuro riutilizzo del comando. @@ -4510,9 +4510,9 @@ eseguite da \file{message\_getter}). Terminato il tempo di attesa si rilascer (\texttt{\small 29--32}) il semaforo per poi uscire. Per verificare il funzionamento dei programmi occorrerà lanciare per primo -\file{message\_getter}\footnote{lanciando per primo \file{message\_setter} - darà luogo ad un errore, non essendo stati creati il semaforo ed il segmento - di memoria condivisa.} che inizierà a stampare una volta al secondo il +\file{message\_getter}\footnote{lanciare per primo \file{message\_setter} darà + luogo ad un errore, non essendo stati creati il semaforo ed il segmento di + memoria condivisa.} che inizierà a stampare una volta al secondo il contenuto del messaggio ed i suoi dati, con qualcosa del tipo: \begin{Verbatim} piccardi@hain:~/gapil/sources$ ./message_getter messaggio @@ -4610,17 +4610,20 @@ testo alla terminazione di quest'ultimo. % LocalWords: SHARED ANONYMOUS thread patch names strace system call userid Di % LocalWords: groupid Michal Wronski Krzysztof Benedyczak wrona posix mqueue % LocalWords: lmqueue gcc mount mqd name oflag attr maxmsg msgsize receive ptr -% LocalWords: send WRONLY NONBLOCK close mqdes EBADF getattr setattr mqstat +% LocalWords: send WRONLY NONBLOCK close mqdes EBADF getattr setattr mqstat to % LocalWords: omqstat curmsgs flags timedsend len prio timespec abs EMSGSIZE % LocalWords: ETIMEDOUT timedreceive getaddr notify sigevent notification l'I % LocalWords: EBUSY sigev SIGNAL signo value sigval siginfo all'userid MESGQ % LocalWords: Konstantin Knizhnik futex tmpfs ramfs cache shared swap CONFIG % LocalWords: lrt blocks PAGECACHE TRUNC CLOEXEC mmap ftruncate munmap FindShm -% LocalWords: CreateShm RemoveShm LIBRARY Library libmqueue FAILED EACCESS +% LocalWords: CreateShm RemoveShm LIBRARY Library libmqueue FAILED EACCESS has % LocalWords: ENAMETOOLONG qualchenome RESTART trywait XOPEN SOURCE timedwait -% LocalWords: process getvalue sval execve pshared ENOSYS heap PAGE destroy +% LocalWords: process getvalue sval execve pshared ENOSYS heap PAGE destroy it % LocalWords: xffffffff Arrays owner perms Queues used bytes messages device -% LocalWords: Cannot find such Segments getter Signal MSGMAXSIZE +% LocalWords: Cannot find such Segments getter Signal MSGMAXSIZE been stable +% LocalWords: for now it's break Berlin sources Let's an accidental feature +% LocalWords: Larry Wall Escape the Hell William ipctestid Identifier segment +% LocalWords: violation dell'I SIGINT setter Fri Dec Sleeping seconds %%% Local Variables: