Skip to content

Commit 711e879

Browse files
author
Vladimir Kotal
committed
more spellchecking
1 parent 8e602c9 commit 711e879

File tree

9 files changed

+39
-26
lines changed

9 files changed

+39
-26
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ spellcheck:
7373
sed 's/pdfbookmark\[[0-9]\]{\([^{}]*\)}{.*}/pdfbookmark{\1}/' | \
7474
sed 's/\\\-//g' | \
7575
sed 's/\\texttt{[^{]*}//g' | \
76+
sed 's/\\\funnm{[^{]*}//g' | \
7677
sed 's/\\emprg{.*}//g' | \
7778
aspell -t --personal=./unix_dict.txt list; \
7879
done

file-api.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
or terminates.
276276
\item If a process needs a temporary file, it can create it, unlink it right
277277
away, and work with it using the existing file descriptor. When the file
278-
descriptor is closed (and all of its possible duplications), the file data is
278+
descriptor is closed (and all of its possible duplicates), the file data is
279279
released.
280280
\item Even \texttt{close} may fail. For example, some filesystems may write the
281281
data on file closure, and if that write fails, \texttt{close} fails.

files.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
\texttt{FAT32} does no provide user and access rights for files so those are
3939
faked when such filesystem is mounted.
4040
\item Upon the system boot, the root filesystem is mounted first, other
41-
filesystems are later mounted via the \texttt{mount} commmand, usually from
41+
filesystems are later mounted via the \texttt{mount} command, usually from
4242
specific startup services based on the system you use. The startup services
4343
sometimes use file \texttt{/etc/fstab} as a source of information about what
4444
filesystems to mount. You can also use \texttt{mount} manually. To unmount a

network.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@
655655
\item If \texttt{connect} was used then \texttt{send} can be used instead of
656656
\texttt{sendto}.
657657
\item Successful return from either \emsl{does not mean successful delivery of
658-
the message to the remote side}, but only instertion of the data to local buffer
658+
the message to the remote side}, but only insertion of the data to local buffer
659659
which is yet to be sent out.
660660
\item It is possible to use \texttt{sendto} for stream service, however the
661661
address will be ignored. The only reason not to use \texttt{write} would be to
@@ -695,7 +695,7 @@
695695
\item Once closed, TCP socket can remain in transitory state which is defined in
696696
TCP protocol for connection closing. Before the socket is completely destroyed,
697697
it is not possible to use another socket with the same port, unless this
698-
behavior was overriden with the \texttt{SO\_REUSEADDR} flag using the
698+
behavior was overridden with the \texttt{SO\_REUSEADDR} flag using the
699699
\texttt{setsockopt} function, see page \pageref{SETSOCKOPT}.
700700
\item Connection reset is abnormal connection termination. In case of TCP
701701
a packet with \texttt{RST} flag is used for such termination. The remote side
@@ -771,10 +771,10 @@
771771
(\texttt{EAFNOSUPPORT}). \texttt{inet\_ntop} returns \texttt{dst} if everything
772772
is OK otherwise returns \texttt{NULL} with \texttt{errno} set.
773773
\item Addresses and ports in binary form are stored as big endian.
774-
\item \texttt{dst} has to be suffciently sized because there is no parameter
774+
\item \texttt{dst} has to be sufficiently sized because there is no parameter
775775
specifying the size. This is not a problem since according to the value of
776776
\texttt{af} appropriate address structure or character array can be passed in.
777-
For maximal lenghts of strings for addresses, 2 macros can be used --
777+
For maximal lengths of strings for addresses, 2 macros can be used --
778778
\texttt{INET\_ADDRSTR\-LEN} (16) or \texttt{INET6\_ADDRSTRLEN} (48).
779779
These values contain space for terminating \texttt{\bs{}0}.
780780
\item \texttt{size} is string size of \texttt{dst}. If not sufficient, the call

proc.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
\texttt{init} process, that will take care of the zombie after the process ends.
463463
\end{description}
464464
\begin{itemize}
465-
\item To get information about running processes programatically is possible
465+
\item To get information about running processes programmatically is possible
466466
using non-standard API (e.g. the \texttt{libproc} library on Solaris built
467467
on top of the \texttt{procfs} filesystem that is mounted under \texttt{/proc}).
468468
\item Note that using \texttt{getppid} value to check if parent exited is not
@@ -697,14 +697,14 @@
697697

698698
\begin{itemize}
699699
\item The UNIX standard does not specify what executable file format systems
700-
should use. While most of the UNIX and Unix-like systems (eg. Linux distros)
701-
use ELF, there are other widely used systems that do not. One example is
702-
macOS (which is a certified UNIX system) that uses the \emph{Mach-O} file
703-
format, short for \emph{Mach Object}. Each Mach-O file is made
700+
should use. While most of the UNIX and Unix-like systems (eg. Linux
701+
distributions) use ELF, there are other widely used systems that do not. One
702+
example is macOS (which is a certified UNIX system) that uses the \emph{Mach-O}
703+
file format, short for \emph{Mach Object}. Each Mach-O file is made
704704
up of one Mach-O header, followed by a series of load commands, followed by one
705705
or more segments, each of which contains between 0 and 255 sections.
706706
\item On Solaris, the \texttt{elfdump} command allows listing sections of the
707-
ELF file in a human readable form. On Linux distros, use \texttt{readelf}.
707+
ELF file in a human readable form. On Linux distributions, use \texttt{readelf}.
708708
\item The \emph{ELF header} contains basic information about the file. Try
709709
``\texttt{readelf -h /bin/ls}'' on any Linux distro.
710710
\item The \emph{program header table} is only present in files that are

synchro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
\end{minipage}
573573
\begin{itemize}
574574
\item creates or opens a new POSIX semaphore. \emph{mode} is same as for
575-
\funnm{open}(). Use ``/somename'' for the \emph{name}.
575+
\funnm{open}(). Use ``\texttt{/somename}'' for the \emph{name}.
576576
\end{itemize}
577577
\texttt{int \funnm{sem\_wait}(sem\_t *\emph{sem});}
578578
\begin{itemize}

sys-v-semaphores.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
\begin{slide}
66
\sltitle{System V semaphore API }
7-
\texttt{int \funnm{semget}(key\_t \emph{key}, int \emph{nsems}, int \emph{semflg});}
7+
\texttt{int \funnm{semget}(key\_t \emph{key}, int \emph{\texttt{nsems}},
8+
int \emph{\texttt{semflg}});}
89
\begin{itemize}
910
\item returns identifier of an array of \texttt{nsems} semaphores associated
1011
with the \texttt{key} key (\texttt{IPC\_PRIVATE} key \dots{} private semaphores,
@@ -13,13 +14,14 @@
1314
\texttt{IPC\_CREAT} (create if does not exist),
1415
\texttt{IPC\_EXCL} (error, if exists).
1516
\end{itemize}
16-
\texttt{int \funnm{semctl}(int \emph{semid}, int \emph{semnum},
17-
int \emph{cmd}, ...);}
17+
\texttt{int \funnm{semctl}(int \emph{\texttt{semid}},
18+
int \emph{\texttt{semnum}}, int \emph{\texttt{cmd}}, ...);}
1819
\begin{itemize}
1920
\item controlling function, optional 4th argument \texttt{arg} is of the
2021
\texttt{union~semun} type.
2122
\end{itemize}
22-
\texttt{int \funnm{semop}(int \emph{semid}, struct sembuf *\emph{sops}, size\_t \emph{nsops});}
23+
\texttt{int \funnm{semop}(int \emph{\texttt{semid}},
24+
struct sembuf *\emph{\texttt{sops}}, size\_t \emph{\texttt{nsops}});}
2325
\begin{itemize}
2426
\item generic operations P and V.
2527
\end{itemize}

threads.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@
563563
then unlocks them in the \emph{post-fork} handler (both for the parent and the
564564
child), you will avoid such deadlocks. When locking mutexes in the
565565
pre-fork handler, other threads are still running so the mutexes held by them
566-
can be released (usually each thread exits a crititcal section in a short time
566+
can be released (usually each thread exits a critical section in a short time
567567
in well written code). Example: \example{pthreads/atfork.c}. For more on this
568568
topic, see [Butenhof].
569569
\item See page \pageref{MUTEXES} on why mutexes locked in other threads on
@@ -710,8 +710,8 @@
710710
\item Mutex = \emph{mutual exclusion}
711711
\item Special form of Dijkstra semaphores -- the difference between mutexes and
712712
binary semaphores is that \emsl{mutex has an owner and locked mutex must be
713-
unlocked only by the thread that acquied it.} This is not the case with
714-
semephores. In order to check whether given mutex was locked by different thread
713+
unlocked only by the thread that acquired it.} This is not the case with
714+
semaphores. In order to check whether given mutex was locked by different thread
715715
when acquiring it, it is necessary to test return value of
716716
\texttt{p\-thread\_mutex\_lock}, and also have the lock checking set, see below.
717717
\item Mutexes are meant to be held for short time only. They are used for
@@ -766,7 +766,7 @@
766766
% \cline{2-4}
767767
\end{tabular}}
768768
\item Static mutex initialization using before mentioned macro will set default
769-
attributes. It is possbile to use initializer function also for statically
769+
attributes. It is possible to use initializer function also for statically
770770
allocated mutex. If a mutex is dynamically allocated, it is always necessary to
771771
use \texttt{pthread\_mutex\_init}, even if the default attributes are desired or
772772
not.
@@ -819,7 +819,7 @@
819819
\item Locking a mutex that is being held by another thread is not correct.
820820
Sometimes a (self)deadlock can ensue, see the previous page. If you need to
821821
unlock a mutex locked by different thread, use binary semaphores instead.
822-
\item When creating a program where effectivity is paramount, it is necessary to
822+
\item When creating a program where efficiency is paramount, it is necessary to
823823
think about how many mutexes will be needed and how exactly will be used.
824824
Even a library that was not written with threads in mind can be converted to be
825825
thread-safe (see page \pageref{THREADSAFE}) by inserting arbitrary function from
@@ -873,7 +873,7 @@
873873
7}''. Conditional variable can be in fact compared to a flag of certain color;
874874
if it is lifted up, it means that the threads waiting for the flag to be waved
875875
are informed (= woken up) and can use this information according its own
876-
judgement. Some threads can wait for \texttt{n} to be bigger than 7, the other
876+
judgment. Some threads can wait for \texttt{n} to be bigger than 7, the other
877877
can be waiting solely for \texttt{n} to change anyhow. It is only up to the
878878
programmer, if for concrete situation uses just one condition variable or
879879
for all situations. For the second situation, the threads waiting on
@@ -967,7 +967,7 @@
967967
\item one conditional variable can be used to announce multiple situations
968968
at once -- e.g. when inserting or removing an item to/from a queue.
969969
Because of this, it is necessary to test the condition the thread is waiting
970-
for. Another consequence of this is that it is neccessary to use broadcast
970+
for. Another consequence of this is that it is necessary to use broadcast
971971
in such situation. Let's assume that both readers and writers are waiting for
972972
condition ``state of queue has changed''. If only single wakeup event is made
973973
after item insertion to the queue, then another writer can be woken up,
@@ -1308,7 +1308,7 @@
13081308
\sltitle{Thread-safe versus reentrant}
13091309
13101310
\begin{itemize}
1311-
\item \emph{thead-safe} means that the function can be called from multiple
1311+
\item \emph{thread-safe} means that the function can be called from multiple
13121312
threads in parallel without destructive consequences
13131313
\begin{itemize}
13141314
\item a function which was not designed to be thread-safe can be
@@ -1390,7 +1390,7 @@
13901390
\item Solaris
13911391
\begin{itemize}
13921392
\item \funnm{pthread\_cond\_reltimedwait\_np}\texttt{(\dots)}
1393-
\item[$\rightarrow$] like timedwait, however the timeout is relative
1393+
\item[$\rightarrow$] like \texttt{timedwait}, however the timeout is relative
13941394
\end{itemize}
13951395
13961396
\item OpenBSD

unix_dict.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,17 @@ pdfkeywords
711711
pagebackref
712712
Gingell
713713
Dekker
714+
Dekker's
714715
TLS
715716
iOS
716717
verhogen
717718
verlagen
719+
programmatically
720+
virtualized
721+
namespaces
722+
decrement
723+
increment
724+
incrementing
725+
decrementing
726+
endianess
727+
Downey

0 commit comments

Comments
 (0)