Aggiornamento date copyright più TODO 5.3
[gapil.git] / thread.tex
index 6dce4cc19587a106d79e5cab679e8237f6ebc3c8..62f4dfdf7e9bc388c02835965d9a36b120d6c0d5 100644 (file)
@@ -1,6 +1,6 @@
 %% thread.tex
 %%
-%% Copyright (C) 2007-2018 Simone Piccardi.  Permission is granted to
+%% Copyright (C) 2007-2019 Simone Piccardi.  Permission is granted to
 %% copy, distribute and/or modify this document under the terms of the GNU Free
 %% Documentation License, Version 1.1 or any later version published by the
 %% Free Software Foundation; with the Invariant Sections being "Un preambolo",
@@ -116,6 +116,24 @@ della \acr{glibc}.
 \label{sec:pthread_management}
 
 
+Benché la funzione sia utilizzabile anche con i processi, tanto che a partire
+dalla versione 2.3 della \acr{glibc} viene a sostituire \func{\_exit} (tramite
+un \textit{wrapper} che la utilizza al suo posto) per la terminazione di tutti
+i \textit{thread} di un processo si deve usare la funzione di sistema
+\func{exit\_group}, il cui prototipo è:
+
+\begin{funcproto}{
+\fhead{linux/unistd.h}
+\fdecl{void exit\_group(int status)}
+\fdesc{Termina tutti i \textit{thread} di un processo.} 
+}
+{La funzione non ha errori e pertanto non ritorna.}
+\end{funcproto}
+
+La funzione è sostanzialmente identica alla \textit{system call} \func{\_exit}
+ma a differenza di quest'ultima, che termina solo il \textit{thread}
+chiamante, termina tutti \textit{thread} del processo. 
+
 
 \section{La sincronizzazione dei \textit{thread}}
 \label{sec:pthread_sync}