| \documentclass[10pt,twocolumn]{book} |
| % For arxiv.org, must be on or before line 5: |
| \pdfoutput=1 |
| |
| % standard packages |
| |
| % A more pleasant font |
| \usepackage{lmodern} |
| \usepackage[T1]{fontenc} % use postscript type 1 fonts |
| \usepackage{textcomp} % use symbols in TS1 encoding |
| \usepackage{mathptmx} % use nice, standard fonts for roman |
| \usepackage[scaled=.92]{helvet} % and sans serif |
| %msfontstub |
| |
| % Improves the text layout |
| \usepackage{microtype} |
| \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts |
| \usepackage{etoolbox} |
| |
| \usepackage{lscape} |
| \usepackage{epsfig} |
| \usepackage{subfigure} |
| % \usepackage{breakurl} |
| \usepackage{graphicx} |
| \usepackage{rotating} |
| \usepackage{enumitem} |
| \setlist[description]{style=unboxed} |
| %\usepackage{enumerate} |
| \usepackage{ifthen} |
| \usepackage{xcolor} |
| \usepackage[shortcuts]{extdash} |
| \usepackage{changepage} |
| \usepackage{listings} |
| \lstset{basicstyle=\ttfamily} |
| % \usepackage[strings]{underscore} |
| % \usepackage{underscore} |
| \usepackage{pifont} % special character for qqz reference point |
| \usepackage{verbatimbox} % for centering verbatim listing in figure environment |
| \usepackage[bottom]{footmisc} % place footnotes under floating figures/tables |
| \usepackage{tabulary} |
| \usepackage[hyphens]{url} |
| \usepackage[bookmarks=true,bookmarksnumbered=true,pdfborder={0 0 0}]{hyperref} |
| \usepackage{footnotebackref} % to enable cross-ref of footnote |
| \usepackage[all]{hypcap} % for going to the top of figure and table |
| \usepackage{epigraph} |
| \setlength{\epigraphwidth}{2.6in} |
| \usepackage[xspace]{ellipsis} |
| |
| % custom packages |
| |
| \usepackage{qqz} |
| \usepackage{origpub} |
| |
| % custom booleans |
| |
| \newboolean{inbook} |
| \setboolean{inbook}{true} |
| \newcommand{\IfInBook}[2]{\ifthenelse{\boolean{inbook}}{#1}{#2}} |
| \newboolean{twocolumn} |
| \setboolean{twocolumn}{true} |
| \newcommand{\IfTwoColumn}[2]{\ifthenelse{\boolean{twocolumn}}{#1}{#2}} |
| \newboolean{hardcover} |
| \setboolean{hardcover}{false} |
| \newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}} |
| \newboolean{sansserif} |
| \setboolean{sansserif}{false} |
| \newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}} |
| \newboolean{lmttforcode} |
| \setboolean{lmttforcode}{true} |
| \newcommand{\IfLmttForCode}[2]{\ifthenelse{\boolean{lmttforcode}}{#1}{#2}} |
| |
| \newcommand{\OneColumnHSpace}[1]{\IfTwoColumn{}{\hspace*{#1}}} |
| |
| \IfSansSerif{ |
| \renewcommand{\familydefault}{\sfdefault} |
| \normalfont |
| \usepackage[italic]{mathastext}[2016/01/06] |
| \renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext |
| }{} |
| |
| \IfLmttForCode{ |
| \AtBeginEnvironment{verbatim}{\renewcommand{\ttdefault}{lmtt}} |
| \AtBeginEnvironment{verbbox}{\renewcommand{\ttdefault}{lmtt}} |
| \AtBeginEnvironment{table}{\renewcommand{\ttdefault}{lmtt}} |
| \AtBeginEnvironment{tabular}{\renewcommand{\ttdefault}{lmtt}} |
| \AtBeginEnvironment{tabulary}{\renewcommand{\ttdefault}{lmtt}} |
| \AtBeginEnvironment{minipage}{\renewcommand{\ttdefault}{lmtt}} |
| }{} |
| |
| \begin{document} |
| |
| %%HTMLSKIP |
| \lstset{ |
| literate={\_}{}{0\discretionary{\_}{}{\_}}% |
| {\_\_}{}{0\discretionary{\_\_}{}{\_\_}}% |
| {->}{}{0\discretionary{->}{}{->}}% |
| } |
| %%HTMLNOSKIP |
| % --- Workaround for Fedora 23 Texlive bug |
| \makeatletter |
| \renewcommand\lstinline[1][]{% |
| \leavevmode\bgroup % \hbox\bgroup --> \bgroup |
| \def\lst@boxpos{b}% |
| \lsthk@PreSet\lstset{flexiblecolumns,#1}% |
| \lsthk@TextStyle |
| \ifnum\iffalse{\fi`}=\z@\fi |
| \@ifnextchar\bgroup{% |
| \ifnum`{=\z@}\fi% |
| \afterassignment\lst@InlineG \let\@let@token}{% |
| \ifnum`{=\z@}\fi\lstinline@}} |
| \makeatother |
| % --- End of workaround for Fedora 23 Texlive bug |
| \newcommand{\co}[1]{\lstinline[breaklines=true,breakatwhitespace=true]{#1}} |
| \newcommand{\nbco}[1]{\hbox{\lstinline[breaklines=false,breakatwhitespace=false]{#1}}} % no break lines for short snippet |
| \newcommand{\qco}[1]{``\nbco{#1}''} % \nbco with quotation marks |
| \newcommand{\tco}[1]{\texttt{\detokenize{#1}}} % for code in tabular environment |
| % \tco{} will break at spaces but not at underscores |
| \newcommand{\nf}[1]{\textnormal{#1}} % to return to normal font |
| |
| \newcommand{\Epigraph}[2]{\epigraphhead[65]{\rmfamily\epigraph{#1}{#2}}} |
| |
| \input{ushyphex} % Hyphenation exceptions for US English from hyphenex package |
| \input{pfhyphex} % Hyphenation exceptions for perfbook |
| |
| \title{ |
| Is Parallel Programming Hard, And, If So, \\ |
| What Can You Do About It?} |
| \author{ |
| Edited by: \\ |
| \\ |
| Paul E. McKenney \\ |
| Linux Technology Center \\ |
| IBM Beaverton \\ |
| \href{mailto:paulmck@linux.vnet.ibm.com}{paulmck@linux.vnet.ibm.com} \\ |
| } % end author |
| % \date{\ } |
| \input{autodate} |
| |
| \setcounter{topnumber}{3} |
| \renewcommand\topfraction{.75} |
| \setcounter{bottomnumber}{2} |
| \renewcommand\bottomfraction{.3} |
| \setcounter{totalnumber}{5} |
| \renewcommand\textfraction{.15} |
| \renewcommand\floatpagefraction{.5} |
| \setcounter{dbltopnumber}{3} |
| \renewcommand\dbltopfraction{.75} |
| \renewcommand\dblfloatpagefraction{.5} |
| |
| \IfTwoColumn{ |
| \setlength{\textheight}{8.25in} |
| \setlength{\textwidth}{6.5in} |
| \setlength{\columnsep}{0.25in} |
| \renewcommand\floatpagefraction{.75} |
| }{ |
| \setlength{\textheight}{8.25in} |
| \setlength{\textwidth}{4.75in} |
| \setlength{\columnsep}{0in} |
| \addtolength{\oddsidemargin}{0.3in} |
| \addtolength{\evensidemargin}{-0.3in} |
| } |
| |
| \IfHardCover{ |
| \addtolength{\topmargin}{-0.25in} |
| \addtolength{\evensidemargin}{-0.25in} |
| }{} |
| |
| \setcounter{secnumdepth}{3} |
| |
| \frontmatter |
| |
| \maketitle |
| \IfTwoColumn{ |
| \onecolumn\begin{adjustwidth*}{.95in}{.8in} |
| \addtolength{\parindent}{6pt} |
| }{} |
| \input{legal} |
| \tableofcontents |
| \IfTwoColumn{ |
| \end{adjustwidth*}\twocolumn |
| }{} |
| |
| \mainmatter |
| |
| \input{howto/howto} |
| \input{intro/intro} |
| \input{cpu/cpu} |
| \input{toolsoftrade/toolsoftrade} |
| \input{count/count.tex} |
| \input{SMPdesign/SMPdesign} |
| \input{locking/locking.tex} |
| \input{owned/owned.tex} |
| \input{defer/defer.tex} |
| \input{datastruct/datastruct.tex} |
| \input{debugging/debugging} |
| \input{formal/formal} |
| \input{together/together.tex} |
| \input{advsync/advsync.tex} |
| \input{rt/rt.tex} |
| \input{easy/easy.tex} |
| % \input{memalloc/memalloc.tex} @@@ covered in SMPdesign |
| \input{future/future.tex} |
| |
| % @@@ Conclusion/summary or something, along with "use the right tool" cartoon. |
| |
| \appendix |
| |
| \input{appendix/appendix.tex} |
| |
| % Index at some point... |
| |
| % page-layout dimensions |
| % \cleardoublepage |
| % ~ \\ |
| % paperheight: \the\paperheight \\ |
| % paperwidth: \the\paperwidth \\ |
| % topmargin: \the\topmargin \\ |
| % headheight: \the\headheight \\ |
| % headsep: \the\headsep \\ |
| % textheight: \the\textheight \\ |
| % textwidth: \the\textwidth \\ |
| % oddsidemargin: \the\oddsidemargin \\ |
| % evensidemargin: \the\evensidemargin \\ |
| % footskip: \the\footskip \\ |
| % topskip: \the\topskip \\ |
| |
| \end{document} |