Update.
2003-05-12 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/bits/atomic.h (__arch_compare_and_exchange_bool_8_rel): Define. (__arch_compare_and_exchange_bool_16_rel): Define. (__ARCH_REL_INSTR): Define if not already defined. (__arch_atomic_exchange_and_add_32): Add "memory" to clobber list. (__arch_atomic_decrement_if_positive_32): Add "memory" to clobber list. (__arch_compare_and_exchange_val_32_acq): Remove release sync. (__arch_compare_and_exchange_val_32_rel): Define. (__arch_atomic_exchange_32): Remove. (__arch_atomic_exchange_32_acq): Define. (__arch_atomic_exchange_32_rel): Define. (atomic_compare_and_exchange_val_rel): Define. (atomic_exchange_acq): Use __arch_atomic_exchange_*_acq forms. (atomic_exchange_rel): Define. * sysdeps/powerpc/powerpc32/bits/atomic.h (__arch_compare_and_exchange_bool_32_acq): Remove release sync. (__arch_compare_and_exchange_bool_32_rel): Define. (__arch_compare_and_exchange_bool_64_rel): Define. (__arch_compare_and_exchange_val_64_rel): Define. (__arch_atomic_exchange_64): Remove. (__arch_atomic_exchange_64_acq): Define. (__arch_atomic_exchange_64_rel): Define. * sysdeps/powerpc/powerpc64/bits/atomic.h (__arch_compare_and_exchange_bool_32_rel): Define. (__arch_compare_and_exchange_bool_64_acq): Remove release sync. (__arch_compare_and_exchange_bool_64_rel): Define. (__arch_compare_and_exchange_val_64_acq): Remove release sync. (__arch_compare_and_exchange_val_64_rel): Define. (__arch_atomic_exchange_64): Remove. (__arch_atomic_exchange_64_acq): Define. (__arch_atomic_exchange_64_rel): Define. (__arch_atomic_exchange_and_add_64): Add "memory" to clobber list. (__arch_atomic_decrement_if_positive_64): Add "memory" to clobber list. [!UP](__ARCH_REL_INSTR): Define as lwsync. the space-padded-by-default conversion specifiers, %e, %k, %l.
This commit is contained in:
parent
edf205d5ef
commit
7158eae4a8
41
ChangeLog
41
ChangeLog
@ -1,3 +1,42 @@
|
|||||||
|
2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/bits/atomic.h
|
||||||
|
(__arch_compare_and_exchange_bool_8_rel): Define.
|
||||||
|
(__arch_compare_and_exchange_bool_16_rel): Define.
|
||||||
|
(__ARCH_REL_INSTR): Define if not already defined.
|
||||||
|
(__arch_atomic_exchange_and_add_32): Add "memory" to clobber list.
|
||||||
|
(__arch_atomic_decrement_if_positive_32):
|
||||||
|
Add "memory" to clobber list.
|
||||||
|
(__arch_compare_and_exchange_val_32_acq): Remove release sync.
|
||||||
|
(__arch_compare_and_exchange_val_32_rel): Define.
|
||||||
|
(__arch_atomic_exchange_32): Remove.
|
||||||
|
(__arch_atomic_exchange_32_acq): Define.
|
||||||
|
(__arch_atomic_exchange_32_rel): Define.
|
||||||
|
(atomic_compare_and_exchange_val_rel): Define.
|
||||||
|
(atomic_exchange_acq): Use __arch_atomic_exchange_*_acq forms.
|
||||||
|
(atomic_exchange_rel): Define.
|
||||||
|
* sysdeps/powerpc/powerpc32/bits/atomic.h
|
||||||
|
(__arch_compare_and_exchange_bool_32_acq): Remove release sync.
|
||||||
|
(__arch_compare_and_exchange_bool_32_rel): Define.
|
||||||
|
(__arch_compare_and_exchange_bool_64_rel): Define.
|
||||||
|
(__arch_compare_and_exchange_val_64_rel): Define.
|
||||||
|
(__arch_atomic_exchange_64): Remove.
|
||||||
|
(__arch_atomic_exchange_64_acq): Define.
|
||||||
|
(__arch_atomic_exchange_64_rel): Define.
|
||||||
|
* sysdeps/powerpc/powerpc64/bits/atomic.h
|
||||||
|
(__arch_compare_and_exchange_bool_32_rel): Define.
|
||||||
|
(__arch_compare_and_exchange_bool_64_acq): Remove release sync.
|
||||||
|
(__arch_compare_and_exchange_bool_64_rel): Define.
|
||||||
|
(__arch_compare_and_exchange_val_64_acq): Remove release sync.
|
||||||
|
(__arch_compare_and_exchange_val_64_rel): Define.
|
||||||
|
(__arch_atomic_exchange_64): Remove.
|
||||||
|
(__arch_atomic_exchange_64_acq): Define.
|
||||||
|
(__arch_atomic_exchange_64_rel): Define.
|
||||||
|
(__arch_atomic_exchange_and_add_64): Add "memory" to clobber list.
|
||||||
|
(__arch_atomic_decrement_if_positive_64):
|
||||||
|
Add "memory" to clobber list.
|
||||||
|
[!UP](__ARCH_REL_INSTR): Define as lwsync.
|
||||||
|
|
||||||
2003-05-11 Andreas Schwab <schwab@suse.de>
|
2003-05-11 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* io/Makefile ($(objpfx)ftwtest.out): Use absolute file names.
|
* io/Makefile ($(objpfx)ftwtest.out): Use absolute file names.
|
||||||
@ -9,7 +48,7 @@
|
|||||||
2003-05-11 Jim Meyering <jim@meyering.net>
|
2003-05-11 Jim Meyering <jim@meyering.net>
|
||||||
|
|
||||||
* time/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
|
* time/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
|
||||||
the space-padded-by-default conversion specifiers, %e, %k, %l.
|
the space-padded-by-default conversion specifiers, %e, %k, %l.
|
||||||
|
|
||||||
2003-05-11 Andreas Schwab <schwab@suse.de>
|
2003-05-11 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
% Load plain if necessary, i.e., if running under initex.
|
% Load plain if necessary, i.e., if running under initex.
|
||||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||||
%
|
%
|
||||||
\def\texinfoversion{2003-02-03.16}
|
\def\texinfoversion{2003-05-04.08}
|
||||||
%
|
%
|
||||||
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||||
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||||
@ -34,12 +34,12 @@
|
|||||||
% ftp://tug.org/tex/texinfo.tex
|
% ftp://tug.org/tex/texinfo.tex
|
||||||
% (and all CTAN mirrors, see http://www.ctan.org),
|
% (and all CTAN mirrors, see http://www.ctan.org),
|
||||||
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||||
%
|
%
|
||||||
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
|
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
|
||||||
%
|
%
|
||||||
% The texinfo.tex in any given Texinfo distribution could well be out
|
% The texinfo.tex in any given Texinfo distribution could well be out
|
||||||
% of date, so if that's what you're using, please check.
|
% of date, so if that's what you're using, please check.
|
||||||
%
|
%
|
||||||
% Send bug reports to bug-texinfo@gnu.org. Please include including a
|
% Send bug reports to bug-texinfo@gnu.org. Please include including a
|
||||||
% complete document in each bug report with which we can reproduce the
|
% complete document in each bug report with which we can reproduce the
|
||||||
% problem. Patches are, of course, greatly appreciated.
|
% problem. Patches are, of course, greatly appreciated.
|
||||||
@ -55,7 +55,7 @@
|
|||||||
% The extra TeX runs get the cross-reference information correct.
|
% The extra TeX runs get the cross-reference information correct.
|
||||||
% Sometimes one run after texindex suffices, and sometimes you need more
|
% Sometimes one run after texindex suffices, and sometimes you need more
|
||||||
% than two; texi2dvi does it as many times as necessary.
|
% than two; texi2dvi does it as many times as necessary.
|
||||||
%
|
%
|
||||||
% It is possible to adapt texinfo.tex for other languages, to some
|
% It is possible to adapt texinfo.tex for other languages, to some
|
||||||
% extent. You can get the existing language-specific files from the
|
% extent. You can get the existing language-specific files from the
|
||||||
% full Texinfo distribution.
|
% full Texinfo distribution.
|
||||||
@ -71,11 +71,11 @@
|
|||||||
\message{Basics,}
|
\message{Basics,}
|
||||||
\chardef\other=12
|
\chardef\other=12
|
||||||
|
|
||||||
% We never want plain's outer \+ definition in Texinfo.
|
% We never want plain's \outer definition of \+ in Texinfo.
|
||||||
% For @tex, we can use \tabalign.
|
% For @tex, we can use \tabalign.
|
||||||
\let\+ = \relax
|
\let\+ = \relax
|
||||||
|
|
||||||
% Save some parts of plain tex whose names we will redefine.
|
% Save some plain tex macros whose names we will redefine.
|
||||||
\let\ptexb=\b
|
\let\ptexb=\b
|
||||||
\let\ptexbullet=\bullet
|
\let\ptexbullet=\bullet
|
||||||
\let\ptexc=\c
|
\let\ptexc=\c
|
||||||
@ -88,10 +88,12 @@
|
|||||||
\let\ptexgtr=>
|
\let\ptexgtr=>
|
||||||
\let\ptexhat=^
|
\let\ptexhat=^
|
||||||
\let\ptexi=\i
|
\let\ptexi=\i
|
||||||
|
\let\ptexindent=\indent
|
||||||
\let\ptexlbrace=\{
|
\let\ptexlbrace=\{
|
||||||
\let\ptexless=<
|
\let\ptexless=<
|
||||||
\let\ptexplus=+
|
\let\ptexplus=+
|
||||||
\let\ptexrbrace=\}
|
\let\ptexrbrace=\}
|
||||||
|
\let\ptexslash=\/
|
||||||
\let\ptexstar=\*
|
\let\ptexstar=\*
|
||||||
\let\ptext=\t
|
\let\ptext=\t
|
||||||
|
|
||||||
@ -164,8 +166,9 @@
|
|||||||
|
|
||||||
% Hyphenation fixes.
|
% Hyphenation fixes.
|
||||||
\hyphenation{ap-pen-dix}
|
\hyphenation{ap-pen-dix}
|
||||||
\hyphenation{mini-buf-fer mini-buf-fers}
|
|
||||||
\hyphenation{eshell}
|
\hyphenation{eshell}
|
||||||
|
\hyphenation{mini-buf-fer mini-buf-fers}
|
||||||
|
\hyphenation{time-stamp}
|
||||||
\hyphenation{white-space}
|
\hyphenation{white-space}
|
||||||
|
|
||||||
% Margin to add to right of even pages, to left of odd pages.
|
% Margin to add to right of even pages, to left of odd pages.
|
||||||
@ -202,7 +205,7 @@
|
|||||||
|
|
||||||
% add check for \lastpenalty to plain's definitions. If the last thing
|
% add check for \lastpenalty to plain's definitions. If the last thing
|
||||||
% we did was a \nobreak, we don't want to insert more space.
|
% we did was a \nobreak, we don't want to insert more space.
|
||||||
%
|
%
|
||||||
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
|
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
|
||||||
\removelastskip\penalty-50\smallskip\fi\fi}
|
\removelastskip\penalty-50\smallskip\fi\fi}
|
||||||
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
|
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
|
||||||
@ -536,6 +539,9 @@
|
|||||||
% @* forces a line break.
|
% @* forces a line break.
|
||||||
\def\*{\hfil\break\hbox{}\ignorespaces}
|
\def\*{\hfil\break\hbox{}\ignorespaces}
|
||||||
|
|
||||||
|
% @/ allows a line break.
|
||||||
|
\let\/=\allowbreak
|
||||||
|
|
||||||
% @. is an end-of-sentence period.
|
% @. is an end-of-sentence period.
|
||||||
\def\.{.\spacefactor=3000 }
|
\def\.{.\spacefactor=3000 }
|
||||||
|
|
||||||
@ -564,7 +570,7 @@
|
|||||||
% explicit \vfill so that the extra space is at the bottom. The
|
% explicit \vfill so that the extra space is at the bottom. The
|
||||||
% threshold for doing this is if the group is more than \vfilllimit
|
% threshold for doing this is if the group is more than \vfilllimit
|
||||||
% percent of a page (\vfilllimit can be changed inside of @tex).
|
% percent of a page (\vfilllimit can be changed inside of @tex).
|
||||||
%
|
%
|
||||||
\newbox\groupbox
|
\newbox\groupbox
|
||||||
\def\vfilllimit{0.7}
|
\def\vfilllimit{0.7}
|
||||||
%
|
%
|
||||||
@ -721,8 +727,7 @@ where each line of input produces a line of output.}
|
|||||||
\spacefactor=3000
|
\spacefactor=3000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% @page forces the start of a new page.
|
||||||
% @page forces the start of a new page
|
|
||||||
%
|
%
|
||||||
\def\page{\par\vfill\supereject}
|
\def\page{\par\vfill\supereject}
|
||||||
|
|
||||||
@ -771,10 +776,10 @@ where each line of input produces a line of output.}
|
|||||||
% @inmargin{TEXT [, RIGHT-TEXT]}
|
% @inmargin{TEXT [, RIGHT-TEXT]}
|
||||||
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
|
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
|
||||||
% else use TEXT for both).
|
% else use TEXT for both).
|
||||||
%
|
%
|
||||||
\def\inmargin#1{\parseinmargin #1,,\finish}
|
\def\inmargin#1{\parseinmargin #1,,\finish}
|
||||||
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
|
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
|
||||||
\setbox0 = \hbox{\ignorespaces #2}%
|
\setbox0 = \hbox{\ignorespaces #2}%
|
||||||
\ifdim\wd0 > 0pt
|
\ifdim\wd0 > 0pt
|
||||||
\def\lefttext{#1}% have both texts
|
\def\lefttext{#1}% have both texts
|
||||||
\def\righttext{#2}%
|
\def\righttext{#2}%
|
||||||
@ -843,8 +848,9 @@ where each line of input produces a line of output.}
|
|||||||
|
|
||||||
% @paragraphindent NCHARS
|
% @paragraphindent NCHARS
|
||||||
% We'll use ems for NCHARS, close enough.
|
% We'll use ems for NCHARS, close enough.
|
||||||
% We cannot implement @paragraphindent asis, though.
|
% NCHARS can also be the word `asis' or `none'.
|
||||||
%
|
% We cannot feasibly implement @paragraphindent asis, though.
|
||||||
|
%
|
||||||
\def\asisword{asis} % no translation, these are keywords
|
\def\asisword{asis} % no translation, these are keywords
|
||||||
\def\noneword{none}
|
\def\noneword{none}
|
||||||
%
|
%
|
||||||
@ -879,6 +885,53 @@ where each line of input produces a line of output.}
|
|||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% @firstparagraphindent WORD
|
||||||
|
% If WORD is `none', then suppress indentation of the first paragraph
|
||||||
|
% after a section heading. If WORD is `insert', then do indentat such
|
||||||
|
% paragraphs.
|
||||||
|
%
|
||||||
|
% The paragraph indentation is suppressed or not by calling
|
||||||
|
% \suppressfirstparagraphindent, which the sectioning commands do. We
|
||||||
|
% switch the definition of this back and forth according to WORD. By
|
||||||
|
% default, we suppress indentation.
|
||||||
|
%
|
||||||
|
\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
|
||||||
|
\newdimen\currentparindent
|
||||||
|
%
|
||||||
|
\def\insertword{insert}
|
||||||
|
%
|
||||||
|
\def\firstparagraphindent{\parsearg\dofirstparagraphindent}
|
||||||
|
\def\dofirstparagraphindent#1{%
|
||||||
|
\def\temp{#1}%
|
||||||
|
\ifx\temp\noneword
|
||||||
|
\let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
|
||||||
|
\else\ifx\temp\insertword
|
||||||
|
\let\suppressfirstparagraphindent = \relax
|
||||||
|
\else
|
||||||
|
\errhelp = \EMsimple
|
||||||
|
\errmessage{Unknown @firstparagraphindent option `\temp'}%
|
||||||
|
\fi\fi
|
||||||
|
}
|
||||||
|
|
||||||
|
% Here is how we actually suppress indentation. Redefine \everypar to
|
||||||
|
% \kern backwards by \parindent, and then reset itself to empty.
|
||||||
|
%
|
||||||
|
% We also make \indent itself not actually do anything until the next
|
||||||
|
% paragraph.
|
||||||
|
%
|
||||||
|
\gdef\dosuppressfirstparagraphindent{%
|
||||||
|
\gdef\indent{%
|
||||||
|
\global\let\indent=\ptexindent
|
||||||
|
\global\everypar = {}%
|
||||||
|
}%
|
||||||
|
\global\everypar = {%
|
||||||
|
\kern-\parindent
|
||||||
|
\global\let\indent=\ptexindent
|
||||||
|
\global\everypar = {}%
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
|
||||||
|
|
||||||
% @asis just yields its argument. Used with @table, for example.
|
% @asis just yields its argument. Used with @table, for example.
|
||||||
%
|
%
|
||||||
\def\asis#1{#1}
|
\def\asis#1{#1}
|
||||||
@ -887,14 +940,14 @@ where each line of input produces a line of output.}
|
|||||||
% We don't use $'s directly in the definition of \math because we need
|
% We don't use $'s directly in the definition of \math because we need
|
||||||
% to set catcodes according to plain TeX first, to allow for subscripts,
|
% to set catcodes according to plain TeX first, to allow for subscripts,
|
||||||
% superscripts, special math chars, etc.
|
% superscripts, special math chars, etc.
|
||||||
%
|
%
|
||||||
\let\implicitmath = $%$ font-lock fix
|
\let\implicitmath = $%$ font-lock fix
|
||||||
%
|
%
|
||||||
% One complication: _ usually means subscripts, but it could also mean
|
% One complication: _ usually means subscripts, but it could also mean
|
||||||
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
|
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
|
||||||
% _ within @math be active (mathcode "8000), and distinguish by seeing
|
% _ within @math be active (mathcode "8000), and distinguish by seeing
|
||||||
% if the current family is \slfam, which is what @var uses.
|
% if the current family is \slfam, which is what @var uses.
|
||||||
%
|
%
|
||||||
{\catcode\underChar = \active
|
{\catcode\underChar = \active
|
||||||
\gdef\mathunderscore{%
|
\gdef\mathunderscore{%
|
||||||
\catcode\underChar=\active
|
\catcode\underChar=\active
|
||||||
@ -905,7 +958,7 @@ where each line of input produces a line of output.}
|
|||||||
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
|
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
|
||||||
% this is not advertised and we don't care. Texinfo does not
|
% this is not advertised and we don't care. Texinfo does not
|
||||||
% otherwise define @\.
|
% otherwise define @\.
|
||||||
%
|
%
|
||||||
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
|
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
|
||||||
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
|
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
|
||||||
%
|
%
|
||||||
@ -920,7 +973,7 @@ where each line of input produces a line of output.}
|
|||||||
% Some active characters (such as <) are spaced differently in math.
|
% Some active characters (such as <) are spaced differently in math.
|
||||||
% We have to reset their definitions in case the @math was an
|
% We have to reset their definitions in case the @math was an
|
||||||
% argument to a command which set the catcodes (such as @item or @section).
|
% argument to a command which set the catcodes (such as @item or @section).
|
||||||
%
|
%
|
||||||
{
|
{
|
||||||
\catcode`^ = \active
|
\catcode`^ = \active
|
||||||
\catcode`< = \active
|
\catcode`< = \active
|
||||||
@ -1046,8 +1099,8 @@ where each line of input produces a line of output.}
|
|||||||
\def\pdfmakeoutlines{{%
|
\def\pdfmakeoutlines{{%
|
||||||
\openin 1 \jobname.toc
|
\openin 1 \jobname.toc
|
||||||
\ifeof 1\else\begingroup
|
\ifeof 1\else\begingroup
|
||||||
\closein 1
|
\closein 1
|
||||||
% Thanh's hack / proper braces in bookmarks
|
% Thanh's hack / proper braces in bookmarks
|
||||||
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
|
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
|
||||||
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
|
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
|
||||||
%
|
%
|
||||||
@ -1076,7 +1129,7 @@ where each line of input produces a line of output.}
|
|||||||
\let\unnumbsubsubsecentry = \subsubsecentry
|
\let\unnumbsubsubsecentry = \subsubsecentry
|
||||||
%
|
%
|
||||||
% Make special characters normal for writing to the pdf file.
|
% Make special characters normal for writing to the pdf file.
|
||||||
%
|
%
|
||||||
\indexnofonts
|
\indexnofonts
|
||||||
\let\tt=\relax
|
\let\tt=\relax
|
||||||
\turnoffactive
|
\turnoffactive
|
||||||
@ -1091,7 +1144,7 @@ where each line of input produces a line of output.}
|
|||||||
\let\nextmakelinks=\makelinks
|
\let\nextmakelinks=\makelinks
|
||||||
\ifnum\lnkcount>0,\fi
|
\ifnum\lnkcount>0,\fi
|
||||||
\picknum{#1}%
|
\picknum{#1}%
|
||||||
\startlink attr{/Border [0 0 0]}
|
\startlink attr{/Border [0 0 0]}
|
||||||
goto name{\pdfmkpgn{\the\pgn}}%
|
goto name{\pdfmkpgn{\the\pgn}}%
|
||||||
\linkcolor #1%
|
\linkcolor #1%
|
||||||
\advance\lnkcount by 1%
|
\advance\lnkcount by 1%
|
||||||
@ -1146,7 +1199,7 @@ where each line of input produces a line of output.}
|
|||||||
\ifx\first0\adn0
|
\ifx\first0\adn0
|
||||||
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
|
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
|
||||||
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
|
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
|
||||||
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
|
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
|
||||||
\else
|
\else
|
||||||
\ifnum0=\countA\else\makelink\fi
|
\ifnum0=\countA\else\makelink\fi
|
||||||
\ifx\first.\let\next=\done\else
|
\ifx\first.\let\next=\done\else
|
||||||
@ -1400,12 +1453,12 @@ where each line of input produces a line of output.}
|
|||||||
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
|
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
|
||||||
% For me, subjectively, the few extra characters that fit aren't worth
|
% For me, subjectively, the few extra characters that fit aren't worth
|
||||||
% the additional smallness of 8pt. So I'm making the default 9pt.
|
% the additional smallness of 8pt. So I'm making the default 9pt.
|
||||||
%
|
%
|
||||||
% By the way, for comparison, here's what fits with @example (10pt):
|
% By the way, for comparison, here's what fits with @example (10pt):
|
||||||
% 8.5x11=71 smallbook=60 a4=75 a5=58
|
% 8.5x11=71 smallbook=60 a4=75 a5=58
|
||||||
%
|
%
|
||||||
% I wish we used A4 paper on this side of the Atlantic.
|
% I wish we used A4 paper on this side of the Atlantic.
|
||||||
%
|
%
|
||||||
% --karl, 24jan03.
|
% --karl, 24jan03.
|
||||||
|
|
||||||
|
|
||||||
@ -1431,7 +1484,8 @@ where each line of input produces a line of output.}
|
|||||||
|
|
||||||
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
|
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
|
||||||
% unless the following character is such as not to need one.
|
% unless the following character is such as not to need one.
|
||||||
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
|
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
|
||||||
|
\ptexslash\fi\fi\fi}
|
||||||
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
|
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
|
||||||
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
|
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
|
||||||
|
|
||||||
@ -1454,7 +1508,7 @@ where each line of input produces a line of output.}
|
|||||||
% Set sfcode to normal for the chars that usually have another value.
|
% Set sfcode to normal for the chars that usually have another value.
|
||||||
% Can't use plain's \frenchspacing because it uses the `\x notation, and
|
% Can't use plain's \frenchspacing because it uses the `\x notation, and
|
||||||
% sometimes \x has an active definition that messes things up.
|
% sometimes \x has an active definition that messes things up.
|
||||||
%
|
%
|
||||||
\catcode`@=11
|
\catcode`@=11
|
||||||
\def\frenchspacing{%
|
\def\frenchspacing{%
|
||||||
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
|
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
|
||||||
@ -1563,7 +1617,7 @@ where each line of input produces a line of output.}
|
|||||||
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
|
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
|
||||||
\else
|
\else
|
||||||
\errhelp = \EMsimple
|
\errhelp = \EMsimple
|
||||||
\errmessage{Unknown @kbdinputstyle `\arg'}%
|
\errmessage{Unknown @kbdinputstyle option `\arg'}%
|
||||||
\fi\fi\fi
|
\fi\fi\fi
|
||||||
}
|
}
|
||||||
\def\worddistinct{distinct}
|
\def\worddistinct{distinct}
|
||||||
@ -1614,7 +1668,7 @@ where each line of input produces a line of output.}
|
|||||||
|
|
||||||
% rms does not like angle brackets --karl, 17may97.
|
% rms does not like angle brackets --karl, 17may97.
|
||||||
% So now @email is just like @uref, unless we are pdf.
|
% So now @email is just like @uref, unless we are pdf.
|
||||||
%
|
%
|
||||||
%\def\email#1{\angleleft{\tt #1}\angleright}
|
%\def\email#1{\angleleft{\tt #1}\angleright}
|
||||||
\ifpdf
|
\ifpdf
|
||||||
\def\email#1{\doemail#1,,\finish}
|
\def\email#1{\doemail#1,,\finish}
|
||||||
@ -1659,6 +1713,16 @@ where each line of input produces a line of output.}
|
|||||||
% @pounds{} is a sterling sign.
|
% @pounds{} is a sterling sign.
|
||||||
\def\pounds{{\it\$}}
|
\def\pounds{{\it\$}}
|
||||||
|
|
||||||
|
% @registeredsymbol - R in a circle. For now, only works in text size;
|
||||||
|
% we'd have to redo the font mechanism to change the \scriptstyle and
|
||||||
|
% \scriptscriptstyle font sizes to make it look right in headings.
|
||||||
|
% Adapted from the plain.tex definition of \copyright.
|
||||||
|
%
|
||||||
|
\def\registeredsymbol{%
|
||||||
|
$^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}%
|
||||||
|
}$%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
\message{page headings,}
|
\message{page headings,}
|
||||||
|
|
||||||
@ -2071,18 +2135,21 @@ where each line of input produces a line of output.}
|
|||||||
\itemizey {#1}{\Eitemize}
|
\itemizey {#1}{\Eitemize}
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\itemizey #1#2{%
|
\def\itemizey#1#2{%
|
||||||
\aboveenvbreak %
|
\aboveenvbreak
|
||||||
\itemmax=\itemindent %
|
\itemmax=\itemindent
|
||||||
\advance \itemmax by -\itemmargin %
|
\advance\itemmax by -\itemmargin
|
||||||
\advance \leftskip by \itemindent %
|
\advance\leftskip by \itemindent
|
||||||
\exdentamount=\itemindent
|
\exdentamount=\itemindent
|
||||||
\parindent = 0pt %
|
\parindent=0pt
|
||||||
\parskip = \smallskipamount %
|
\parskip=\smallskipamount
|
||||||
\ifdim \parskip=0pt \parskip=2pt \fi%
|
\ifdim\parskip=0pt \parskip=2pt \fi
|
||||||
\def#2{\endgraf\afterenvbreak\endgroup}%
|
\def#2{\endgraf\afterenvbreak\endgroup}%
|
||||||
\def\itemcontents{#1}%
|
\def\itemcontents{#1}%
|
||||||
\let\item=\itemizeitem}
|
% @itemize with no arg is equivalent to @itemize @bullet.
|
||||||
|
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
|
||||||
|
\let\item=\itemizeitem
|
||||||
|
}
|
||||||
|
|
||||||
% \splitoff TOKENS\endmark defines \first to be the first token in
|
% \splitoff TOKENS\endmark defines \first to be the first token in
|
||||||
% TOKENS, and \rest to be the remainder.
|
% TOKENS, and \rest to be the remainder.
|
||||||
@ -2493,12 +2560,12 @@ width0pt\relax} \fi
|
|||||||
% @deffn ...
|
% @deffn ...
|
||||||
% @end deffn
|
% @end deffn
|
||||||
% @end ignore
|
% @end ignore
|
||||||
%
|
%
|
||||||
% The @end deffn is going to get expanded, because we're trying to allow
|
% The @end deffn is going to get expanded, because we're trying to allow
|
||||||
% nested conditionals. But we don't want to expand the actual @deffn,
|
% nested conditionals. But we don't want to expand the actual @deffn,
|
||||||
% since it might be syntactically correct and intended to be ignored.
|
% since it might be syntactically correct and intended to be ignored.
|
||||||
% Since \end checks for \relax, using \empty does not cause an error.
|
% Since \end checks for \relax, using \empty does not cause an error.
|
||||||
%
|
%
|
||||||
\def\ignoremorecommands{%
|
\def\ignoremorecommands{%
|
||||||
\let\defcodeindex = \relax
|
\let\defcodeindex = \relax
|
||||||
\let\defcv = \empty
|
\let\defcv = \empty
|
||||||
@ -2903,10 +2970,10 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% @synindex foo bar makes index foo feed into index bar.
|
% @synindex foo bar makes index foo feed into index bar.
|
||||||
% Do this instead of @defindex foo if you don't want it as a separate index.
|
% Do this instead of @defindex foo if you don't want it as a separate index.
|
||||||
%
|
%
|
||||||
% @syncodeindex foo bar similar, but put all entries made for index foo
|
% @syncodeindex foo bar similar, but put all entries made for index foo
|
||||||
% inside @code.
|
% inside @code.
|
||||||
%
|
%
|
||||||
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
|
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
|
||||||
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
|
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
|
||||||
|
|
||||||
@ -2948,13 +3015,13 @@ width0pt\relax} \fi
|
|||||||
% Take care of Texinfo commands that can appear in an index entry.
|
% Take care of Texinfo commands that can appear in an index entry.
|
||||||
% Since there are some commands we want to expand, and others we don't,
|
% Since there are some commands we want to expand, and others we don't,
|
||||||
% we have to laboriously prevent expansion for those that we don't.
|
% we have to laboriously prevent expansion for those that we don't.
|
||||||
%
|
%
|
||||||
\def\indexdummies{%
|
\def\indexdummies{%
|
||||||
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
|
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
|
||||||
\def\ {\realbackslash\space }%
|
\def\ {\realbackslash\space }%
|
||||||
% Need these in case \tex is in effect and \{ is a \delimiter again.
|
% Need these in case \tex is in effect and \{ is a \delimiter again.
|
||||||
% But can't use \lbracecmd and \rbracecmd because texindex assumes
|
% But can't use \lbracecmd and \rbracecmd because texindex assumes
|
||||||
% braces and backslashes are used only as delimiters.
|
% braces and backslashes are used only as delimiters.
|
||||||
\let\{ = \mylbrace
|
\let\{ = \mylbrace
|
||||||
\let\} = \myrbrace
|
\let\} = \myrbrace
|
||||||
%
|
%
|
||||||
@ -2963,14 +3030,14 @@ width0pt\relax} \fi
|
|||||||
% words, not control letters, because the \space would be incorrect
|
% words, not control letters, because the \space would be incorrect
|
||||||
% for control characters, but is needed to separate the control word
|
% for control characters, but is needed to separate the control word
|
||||||
% from whatever follows.
|
% from whatever follows.
|
||||||
%
|
%
|
||||||
% For control letters, we have \definedummyletter, which omits the
|
% For control letters, we have \definedummyletter, which omits the
|
||||||
% space.
|
% space.
|
||||||
%
|
%
|
||||||
% These can be used both for control words that take an argument and
|
% These can be used both for control words that take an argument and
|
||||||
% those that do not. If it is followed by {arg} in the input, then
|
% those that do not. If it is followed by {arg} in the input, then
|
||||||
% that will dutifully get written to the index (or wherever).
|
% that will dutifully get written to the index (or wherever).
|
||||||
%
|
%
|
||||||
\def\definedummyword##1{%
|
\def\definedummyword##1{%
|
||||||
\expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
|
\expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
|
||||||
}%
|
}%
|
||||||
@ -2983,9 +3050,9 @@ width0pt\relax} \fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
% For the aux file, @ is the escape character. So we want to redefine
|
% For the aux file, @ is the escape character. So we want to redefine
|
||||||
% everything using @ instead of \realbackslash. When everything uses
|
% everything using @ instead of \realbackslash. When everything uses
|
||||||
% @, this will be simpler.
|
% @, this will be simpler.
|
||||||
%
|
%
|
||||||
\def\atdummies{%
|
\def\atdummies{%
|
||||||
\def\@{@@}%
|
\def\@{@@}%
|
||||||
\def\ {@ }%
|
\def\ {@ }%
|
||||||
@ -3006,7 +3073,7 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% Called from \indexdummies and \atdummies. \definedummyword and
|
% Called from \indexdummies and \atdummies. \definedummyword and
|
||||||
% \definedummyletter must be defined first.
|
% \definedummyletter must be defined first.
|
||||||
%
|
%
|
||||||
\def\commondummies{%
|
\def\commondummies{%
|
||||||
%
|
%
|
||||||
\normalturnoffactive
|
\normalturnoffactive
|
||||||
@ -3326,6 +3393,7 @@ width0pt\relax} \fi
|
|||||||
%
|
%
|
||||||
\smallfonts \rm
|
\smallfonts \rm
|
||||||
\tolerance = 9500
|
\tolerance = 9500
|
||||||
|
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
|
||||||
\indexbreaks
|
\indexbreaks
|
||||||
%
|
%
|
||||||
% See if the index file exists and is nonempty.
|
% See if the index file exists and is nonempty.
|
||||||
@ -3569,7 +3637,7 @@ width0pt\relax} \fi
|
|||||||
\wd0=\hsize \wd2=\hsize
|
\wd0=\hsize \wd2=\hsize
|
||||||
\hbox to\pagewidth{\box0\hfil\box2}%
|
\hbox to\pagewidth{\box0\hfil\box2}%
|
||||||
}
|
}
|
||||||
%
|
%
|
||||||
% All done with double columns.
|
% All done with double columns.
|
||||||
\def\enddoublecolumns{%
|
\def\enddoublecolumns{%
|
||||||
\output = {%
|
\output = {%
|
||||||
@ -3707,6 +3775,7 @@ width0pt\relax} \fi
|
|||||||
\numberedsubsubseczzz{#2}
|
\numberedsubsubseczzz{#2}
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
|
\suppressfirstparagraphindent
|
||||||
}
|
}
|
||||||
|
|
||||||
% like \numhead, but chooses appendix heading levels
|
% like \numhead, but chooses appendix heading levels
|
||||||
@ -3726,6 +3795,7 @@ width0pt\relax} \fi
|
|||||||
\appendixsubsubseczzz{#2}
|
\appendixsubsubseczzz{#2}
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
|
\suppressfirstparagraphindent
|
||||||
}
|
}
|
||||||
|
|
||||||
% like \numhead, but chooses numberless heading levels
|
% like \numhead, but chooses numberless heading levels
|
||||||
@ -3745,6 +3815,7 @@ width0pt\relax} \fi
|
|||||||
\unnumberedsubsubseczzz{#2}
|
\unnumberedsubsubseczzz{#2}
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
|
\suppressfirstparagraphindent
|
||||||
}
|
}
|
||||||
|
|
||||||
% @chapter, @appendix, @unnumbered.
|
% @chapter, @appendix, @unnumbered.
|
||||||
@ -4357,7 +4428,7 @@ width0pt\relax} \fi
|
|||||||
% @foo ... @end foo.
|
% @foo ... @end foo.
|
||||||
|
|
||||||
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
|
||||||
%
|
%
|
||||||
% Since these characters are used in examples, it should be an even number of
|
% Since these characters are used in examples, it should be an even number of
|
||||||
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
% \tt widths. Each \tt character is 1en, so two makes it 1em.
|
||||||
%
|
%
|
||||||
@ -4369,7 +4440,7 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% The @error{} command.
|
% The @error{} command.
|
||||||
% Adapted from the TeXbook's \boxit.
|
% Adapted from the TeXbook's \boxit.
|
||||||
%
|
%
|
||||||
\newbox\errorbox
|
\newbox\errorbox
|
||||||
%
|
%
|
||||||
{\tentt \global\dimen0 = 3em}% Width of the box.
|
{\tentt \global\dimen0 = 3em}% Width of the box.
|
||||||
@ -4416,9 +4487,11 @@ width0pt\relax} \fi
|
|||||||
\let\equiv=\ptexequiv
|
\let\equiv=\ptexequiv
|
||||||
\let\!=\ptexexclam
|
\let\!=\ptexexclam
|
||||||
\let\i=\ptexi
|
\let\i=\ptexi
|
||||||
|
\let\indent=\ptexindent
|
||||||
\let\{=\ptexlbrace
|
\let\{=\ptexlbrace
|
||||||
\let\+=\tabalign
|
\let\+=\tabalign
|
||||||
\let\}=\ptexrbrace
|
\let\}=\ptexrbrace
|
||||||
|
\let\/=\ptexslash
|
||||||
\let\*=\ptexstar
|
\let\*=\ptexstar
|
||||||
\let\t=\ptext
|
\let\t=\ptext
|
||||||
%
|
%
|
||||||
@ -4668,7 +4741,7 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
|
|
||||||
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
|
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
|
||||||
% If we want to allow any <char> as delimiter,
|
% If we want to allow any <char> as delimiter,
|
||||||
% we need the curly braces so that makeinfo sees the @verb command, eg:
|
% we need the curly braces so that makeinfo sees the @verb command, eg:
|
||||||
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
|
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
|
||||||
%
|
%
|
||||||
@ -4746,8 +4819,8 @@ width0pt\relax} \fi
|
|||||||
\everypar{\starttabbox}%
|
\everypar{\starttabbox}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% Do the @verb magic: verbatim text is quoted by unique
|
% Do the @verb magic: verbatim text is quoted by unique
|
||||||
% delimiter characters. Before first delimiter expect a
|
% delimiter characters. Before first delimiter expect a
|
||||||
% right brace, after last delimiter expect closing brace:
|
% right brace, after last delimiter expect closing brace:
|
||||||
%
|
%
|
||||||
% \def\doverb'{'<char>#1<char>'}'{#1}
|
% \def\doverb'{'<char>#1<char>'}'{#1}
|
||||||
@ -4766,7 +4839,7 @@ width0pt\relax} \fi
|
|||||||
%
|
%
|
||||||
% \def\doverbatim#1@end verbatim{#1}
|
% \def\doverbatim#1@end verbatim{#1}
|
||||||
%
|
%
|
||||||
% For Texinfo it's a lot easier than for LaTeX,
|
% For Texinfo it's a lot easier than for LaTeX,
|
||||||
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
|
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
|
||||||
% we need not redefine '\', '{' and '}'.
|
% we need not redefine '\', '{' and '}'.
|
||||||
%
|
%
|
||||||
@ -4833,14 +4906,14 @@ width0pt\relax} \fi
|
|||||||
% @copying ... @end copying.
|
% @copying ... @end copying.
|
||||||
% Save the text away for @insertcopying later. Many commands won't be
|
% Save the text away for @insertcopying later. Many commands won't be
|
||||||
% allowed in this context, but that's ok.
|
% allowed in this context, but that's ok.
|
||||||
%
|
%
|
||||||
% We save the uninterpreted tokens, rather than creating a box.
|
% We save the uninterpreted tokens, rather than creating a box.
|
||||||
% Saving the text in a box would be much easier, but then all the
|
% Saving the text in a box would be much easier, but then all the
|
||||||
% typesetting commands (@smallbook, font changes, etc.) have to be done
|
% typesetting commands (@smallbook, font changes, etc.) have to be done
|
||||||
% beforehand -- and a) we want @copying to be done first in the source
|
% beforehand -- and a) we want @copying to be done first in the source
|
||||||
% file; b) letting users define the frontmatter in as flexible order as
|
% file; b) letting users define the frontmatter in as flexible order as
|
||||||
% possible is very desirable.
|
% possible is very desirable.
|
||||||
%
|
%
|
||||||
\def\copying{\begingroup
|
\def\copying{\begingroup
|
||||||
% Define a command to swallow text until we reach `@end copying'.
|
% Define a command to swallow text until we reach `@end copying'.
|
||||||
% \ is the escape char in this texinfo.tex file, so it is the
|
% \ is the escape char in this texinfo.tex file, so it is the
|
||||||
@ -4863,15 +4936,15 @@ width0pt\relax} \fi
|
|||||||
% end-of-line to be a \par, as would happen with the normal active
|
% end-of-line to be a \par, as would happen with the normal active
|
||||||
% definition of ^^M. On the third hand, two ^^M's in a row should still
|
% definition of ^^M. On the third hand, two ^^M's in a row should still
|
||||||
% generate a \par.
|
% generate a \par.
|
||||||
%
|
%
|
||||||
% Our approach is to make ^^M insert a space and a penalty1 normally;
|
% Our approach is to make ^^M insert a space and a penalty1 normally;
|
||||||
% then it can also check if \lastpenalty=1. If it does, then manually
|
% then it can also check if \lastpenalty=1. If it does, then manually
|
||||||
% do \par.
|
% do \par.
|
||||||
%
|
%
|
||||||
% This messes up the normal definitions of @c[omment], so we redefine
|
% This messes up the normal definitions of @c[omment], so we redefine
|
||||||
% it. Similarly for @ignore. (These commands are used in the gcc
|
% it. Similarly for @ignore. (These commands are used in the gcc
|
||||||
% manual for man page generation.)
|
% manual for man page generation.)
|
||||||
%
|
%
|
||||||
% Seems pretty fragile, most line-oriented commands will presumably
|
% Seems pretty fragile, most line-oriented commands will presumably
|
||||||
% fail, but for the limited use of getting the copying text (which
|
% fail, but for the limited use of getting the copying text (which
|
||||||
% should be quite simple) inserted, we can hope it's ok.
|
% should be quite simple) inserted, we can hope it's ok.
|
||||||
@ -4912,7 +4985,7 @@ width0pt\relax} \fi
|
|||||||
\newcount\parencount
|
\newcount\parencount
|
||||||
|
|
||||||
% We want ()&[] to print specially on the defun line.
|
% We want ()&[] to print specially on the defun line.
|
||||||
%
|
%
|
||||||
\def\activeparens{%
|
\def\activeparens{%
|
||||||
\catcode`\(=\active \catcode`\)=\active
|
\catcode`\(=\active \catcode`\)=\active
|
||||||
\catcode`\&=\active
|
\catcode`\&=\active
|
||||||
@ -5015,7 +5088,7 @@ width0pt\relax} \fi
|
|||||||
% #1 is the \E... control sequence to end the definition (which we define).
|
% #1 is the \E... control sequence to end the definition (which we define).
|
||||||
% #2 is the \...x control sequence (which our caller defines).
|
% #2 is the \...x control sequence (which our caller defines).
|
||||||
% #3 is the control sequence to process the header, such as \defunheader.
|
% #3 is the control sequence to process the header, such as \defunheader.
|
||||||
%
|
%
|
||||||
\def\parsebodycommon#1#2#3{%
|
\def\parsebodycommon#1#2#3{%
|
||||||
\begingroup\inENV
|
\begingroup\inENV
|
||||||
% If there are two @def commands in a row, we'll have a \nobreak,
|
% If there are two @def commands in a row, we'll have a \nobreak,
|
||||||
@ -5038,7 +5111,7 @@ width0pt\relax} \fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
% Common part of the \...x definitions.
|
% Common part of the \...x definitions.
|
||||||
%
|
%
|
||||||
\def\defxbodycommon{%
|
\def\defxbodycommon{%
|
||||||
% As with \parsebodycommon above, allow line break if we have multiple
|
% As with \parsebodycommon above, allow line break if we have multiple
|
||||||
% x headers in a row. It's not a great place, though.
|
% x headers in a row. It's not a great place, though.
|
||||||
@ -5089,7 +5162,7 @@ width0pt\relax} \fi
|
|||||||
% to account for this both in the \...x definition and in parsing the
|
% to account for this both in the \...x definition and in parsing the
|
||||||
% input at hand. Thus also need a control sequence (passed as #5) for
|
% input at hand. Thus also need a control sequence (passed as #5) for
|
||||||
% the \E... definition to assign the category name to.
|
% the \E... definition to assign the category name to.
|
||||||
%
|
%
|
||||||
\def\deftypeopparsebody#1#2#3#4#5 #6 {%
|
\def\deftypeopparsebody#1#2#3#4#5 #6 {%
|
||||||
\parsebodycommon{#1}{#2}{#3}%
|
\parsebodycommon{#1}{#2}{#3}%
|
||||||
\def#2##1 ##2 ##3 {\def#4{##1}%
|
\def#2##1 ##2 ##3 {\def#4{##1}%
|
||||||
@ -5194,7 +5267,7 @@ width0pt\relax} \fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
% This expands the args and terminates the paragraph they comprise.
|
% This expands the args and terminates the paragraph they comprise.
|
||||||
%
|
%
|
||||||
\def\defunargs#1{\functionparens \sl
|
\def\defunargs#1{\functionparens \sl
|
||||||
% Expand, preventing hyphenation at `-' chars.
|
% Expand, preventing hyphenation at `-' chars.
|
||||||
% Note that groups don't affect changes in \hyphenchar.
|
% Note that groups don't affect changes in \hyphenchar.
|
||||||
@ -5456,7 +5529,7 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% These definitions are used if you use @defunx (etc.)
|
% These definitions are used if you use @defunx (etc.)
|
||||||
% anywhere other than immediately after a @defun or @defunx.
|
% anywhere other than immediately after a @defun or @defunx.
|
||||||
%
|
%
|
||||||
\def\defcvx#1 {\errmessage{@defcvx in invalid context}}
|
\def\defcvx#1 {\errmessage{@defcvx in invalid context}}
|
||||||
\def\deffnx#1 {\errmessage{@deffnx in invalid context}}
|
\def\deffnx#1 {\errmessage{@deffnx in invalid context}}
|
||||||
\def\defivarx#1 {\errmessage{@defivarx in invalid context}}
|
\def\defivarx#1 {\errmessage{@defivarx in invalid context}}
|
||||||
@ -5628,7 +5701,7 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% Called by \do from \dounmacro on each macro. The idea is to omit any
|
% Called by \do from \dounmacro on each macro. The idea is to omit any
|
||||||
% macro definitions that have been changed to \relax.
|
% macro definitions that have been changed to \relax.
|
||||||
%
|
%
|
||||||
\def\unmacrodo#1{%
|
\def\unmacrodo#1{%
|
||||||
\ifx#1\relax
|
\ifx#1\relax
|
||||||
% remove this
|
% remove this
|
||||||
@ -5784,8 +5857,8 @@ width0pt\relax} \fi
|
|||||||
|
|
||||||
% @node's job is to define \lastnode.
|
% @node's job is to define \lastnode.
|
||||||
\def\node{\ENVcheck\parsearg\nodezzz}
|
\def\node{\ENVcheck\parsearg\nodezzz}
|
||||||
\def\nodezzz#1{\nodexxx [#1,]}
|
\def\nodezzz#1{\nodexxx #1,\finishnodeparse}
|
||||||
\def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
|
\def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}}
|
||||||
\let\nwnode=\node
|
\let\nwnode=\node
|
||||||
\let\lastnode=\relax
|
\let\lastnode=\relax
|
||||||
|
|
||||||
@ -5823,14 +5896,14 @@ width0pt\relax} \fi
|
|||||||
% anchor), namely NAME-title (the corresponding @chapter/etc. name),
|
% anchor), namely NAME-title (the corresponding @chapter/etc. name),
|
||||||
% NAME-pg (the page number), and NAME-snt (section number and type).
|
% NAME-pg (the page number), and NAME-snt (section number and type).
|
||||||
% Called from \foonoderef.
|
% Called from \foonoderef.
|
||||||
%
|
%
|
||||||
% We have to set \indexdummies so commands such as @code in a section
|
% We have to set \indexdummies so commands such as @code in a section
|
||||||
% title aren't expanded. It would be nicer not to expand the titles in
|
% title aren't expanded. It would be nicer not to expand the titles in
|
||||||
% the first place, but there's so many layers that that is hard to do.
|
% the first place, but there's so many layers that that is hard to do.
|
||||||
%
|
%
|
||||||
% Likewise, use \turnoffactive so that punctuation chars such as underscore
|
% Likewise, use \turnoffactive so that punctuation chars such as underscore
|
||||||
% and backslash work in node names.
|
% and backslash work in node names.
|
||||||
%
|
%
|
||||||
\def\setref#1#2{{%
|
\def\setref#1#2{{%
|
||||||
\atdummies
|
\atdummies
|
||||||
\pdfmkdest{#1}%
|
\pdfmkdest{#1}%
|
||||||
@ -5913,14 +5986,25 @@ width0pt\relax} \fi
|
|||||||
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
|
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
|
||||||
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
|
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
|
||||||
}%
|
}%
|
||||||
% [mynode],
|
% output the `[mynode]' via a macro.
|
||||||
[\printednodename],\space
|
\xrefprintnodename\printednodename
|
||||||
% page 3
|
%
|
||||||
|
% But we always want a comma and a space:
|
||||||
|
,\space
|
||||||
|
%
|
||||||
|
% output the `page 3'.
|
||||||
\turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
|
\turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
|
||||||
\fi
|
\fi
|
||||||
\endlink
|
\endlink
|
||||||
\endgroup}
|
\endgroup}
|
||||||
|
|
||||||
|
% This macro is called from \xrefX for the `[nodename]' part of xref
|
||||||
|
% output. It's a separate macro only so it can be changed more easily,
|
||||||
|
% since not square brackets don't work in some documents. Particularly
|
||||||
|
% one that Bob is working on :).
|
||||||
|
%
|
||||||
|
\def\xrefprintnodename#1{[#1]}
|
||||||
|
|
||||||
% \dosetq is called from \setref to do the actual \write (\iflinks).
|
% \dosetq is called from \setref to do the actual \write (\iflinks).
|
||||||
%
|
%
|
||||||
\def\dosetq#1#2{%
|
\def\dosetq#1#2{%
|
||||||
@ -5935,7 +6019,7 @@ width0pt\relax} \fi
|
|||||||
\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
|
\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
|
||||||
|
|
||||||
% Things to be expanded by \internalsetq.
|
% Things to be expanded by \internalsetq.
|
||||||
%
|
%
|
||||||
\def\Ypagenumber{\folio}
|
\def\Ypagenumber{\folio}
|
||||||
\def\Ytitle{\thissection}
|
\def\Ytitle{\thissection}
|
||||||
\def\Ynothing{}
|
\def\Ynothing{}
|
||||||
@ -6120,13 +6204,14 @@ width0pt\relax} \fi
|
|||||||
%
|
%
|
||||||
% Auto-number footnotes. Otherwise like plain.
|
% Auto-number footnotes. Otherwise like plain.
|
||||||
\gdef\footnote{%
|
\gdef\footnote{%
|
||||||
|
\let\indent=\ptexindent
|
||||||
\global\advance\footnoteno by \@ne
|
\global\advance\footnoteno by \@ne
|
||||||
\edef\thisfootno{$^{\the\footnoteno}$}%
|
\edef\thisfootno{$^{\the\footnoteno}$}%
|
||||||
%
|
%
|
||||||
% In case the footnote comes at the end of a sentence, preserve the
|
% In case the footnote comes at the end of a sentence, preserve the
|
||||||
% extra spacing after we do the footnote number.
|
% extra spacing after we do the footnote number.
|
||||||
\let\@sf\empty
|
\let\@sf\empty
|
||||||
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
|
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
|
||||||
%
|
%
|
||||||
% Remove inadvertent blank space before typesetting the footnote number.
|
% Remove inadvertent blank space before typesetting the footnote number.
|
||||||
\unskip
|
\unskip
|
||||||
@ -6267,7 +6352,7 @@ width0pt\relax} \fi
|
|||||||
\nobreak\bigskip
|
\nobreak\bigskip
|
||||||
% Usually we'll have text after the image which will insert
|
% Usually we'll have text after the image which will insert
|
||||||
% \parskip glue, so insert it here too to equalize the space
|
% \parskip glue, so insert it here too to equalize the space
|
||||||
% above and below.
|
% above and below.
|
||||||
\nobreak\vskip\parskip
|
\nobreak\vskip\parskip
|
||||||
\nobreak
|
\nobreak
|
||||||
\line\bgroup\hss
|
\line\bgroup\hss
|
||||||
@ -6355,7 +6440,7 @@ should work if nowhere else does.}
|
|||||||
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
|
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
|
||||||
% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
|
% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
|
||||||
% physical page width.
|
% physical page width.
|
||||||
%
|
%
|
||||||
% We also call \setleading{\textleading}, so the caller should define
|
% We also call \setleading{\textleading}, so the caller should define
|
||||||
% \textleading. The caller should also set \parskip.
|
% \textleading. The caller should also set \parskip.
|
||||||
%
|
%
|
||||||
@ -6423,7 +6508,7 @@ should work if nowhere else does.}
|
|||||||
\parskip = 3pt plus 2pt minus 1pt
|
\parskip = 3pt plus 2pt minus 1pt
|
||||||
\textleading = 13.2pt
|
\textleading = 13.2pt
|
||||||
%
|
%
|
||||||
% Double-side printing via postscript on Laserjet 4050
|
% Double-side printing via postscript on Laserjet 4050
|
||||||
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
|
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
|
||||||
% To change the settings for a different printer or situation, adjust
|
% To change the settings for a different printer or situation, adjust
|
||||||
% \normaloffset until the front-side and back-side texts align. Then
|
% \normaloffset until the front-side and back-side texts align. Then
|
||||||
@ -6464,7 +6549,7 @@ should work if nowhere else does.}
|
|||||||
\tableindent = 12mm
|
\tableindent = 12mm
|
||||||
}}
|
}}
|
||||||
|
|
||||||
% A specific text layout, 24x15cm overall, intended for A4 paper.
|
% A specific text layout, 24x15cm overall, intended for A4 paper.
|
||||||
\def\afourlatex{{\globaldefs = 1
|
\def\afourlatex{{\globaldefs = 1
|
||||||
\afourpaper
|
\afourpaper
|
||||||
\internalpagesizes{237mm}{150mm}%
|
\internalpagesizes{237mm}{150mm}%
|
||||||
@ -6640,7 +6725,7 @@ should work if nowhere else does.}
|
|||||||
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
|
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
|
||||||
% the literal character `\'. (Thus, \ is not expandable when this is in
|
% the literal character `\'. (Thus, \ is not expandable when this is in
|
||||||
% effect.)
|
% effect.)
|
||||||
%
|
%
|
||||||
@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
|
@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
|
||||||
|
|
||||||
% Make _ and + \other characters, temporarily.
|
% Make _ and + \other characters, temporarily.
|
||||||
@ -6669,7 +6754,7 @@ should work if nowhere else does.}
|
|||||||
% Say @foo, not \foo, in error messages.
|
% Say @foo, not \foo, in error messages.
|
||||||
@escapechar = `@@
|
@escapechar = `@@
|
||||||
|
|
||||||
% These look ok in all fonts, so just make them not special.
|
% These look ok in all fonts, so just make them not special.
|
||||||
@catcode`@& = @other
|
@catcode`@& = @other
|
||||||
@catcode`@# = @other
|
@catcode`@# = @other
|
||||||
@catcode`@% = @other
|
@catcode`@% = @other
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
|
||||||
|
(lll_mutex_unlock): Use atomic_exchange_rel.
|
||||||
|
|
||||||
2003-05-11 Ulrich Drepper <drepper@redhat.com>
|
2003-05-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* cond-perf.c (cons): Add missing locking around setting of alldone.
|
* cond-perf.c (cons): Add missing locking around setting of alldone.
|
||||||
|
@ -115,7 +115,7 @@ extern int __lll_timedlock_wait
|
|||||||
#define lll_mutex_unlock(lock) \
|
#define lll_mutex_unlock(lock) \
|
||||||
((void) ({ \
|
((void) ({ \
|
||||||
int *__futex = &(lock); \
|
int *__futex = &(lock); \
|
||||||
int __val = atomic_exchange (__futex, 0); \
|
int __val = atomic_exchange_rel (__futex, 0); \
|
||||||
if (__builtin_expect (__val > 1, 0)) \
|
if (__builtin_expect (__val > 1, 0)) \
|
||||||
lll_futex_wake (__futex, 1); \
|
lll_futex_wake (__futex, 1); \
|
||||||
}))
|
}))
|
||||||
|
@ -53,28 +53,31 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
|
|
||||||
#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
|
#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
|
||||||
(abort (), 0)
|
(abort (), 0)
|
||||||
|
|
||||||
|
#define __arch_compare_and_exchange_bool_8_rel(mem, newval, oldval) \
|
||||||
|
(abort (), 0)
|
||||||
|
|
||||||
|
#define __arch_compare_and_exchange_bool_16_rel(mem, newval, oldval) \
|
||||||
|
(abort (), 0)
|
||||||
|
|
||||||
#ifdef UP
|
#ifdef UP
|
||||||
# define __ARCH_ACQ_INSTR ""
|
# define __ARCH_ACQ_INSTR ""
|
||||||
# define __ARCH_REL_INSTR ""
|
# define __ARCH_REL_INSTR ""
|
||||||
#else
|
#else
|
||||||
# define __ARCH_ACQ_INSTR "isync"
|
# define __ARCH_ACQ_INSTR "isync"
|
||||||
# define __ARCH_REL_INSTR "sync"
|
# ifndef __ARCH_REL_INSTR
|
||||||
|
# define __ARCH_REL_INSTR "sync"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define atomic_full_barrier() __asm ("sync" ::: "memory")
|
#define atomic_full_barrier() __asm ("sync" ::: "memory")
|
||||||
#define atomic_write_barrier() __asm ("eieio" ::: "memory")
|
#define atomic_write_barrier() __asm ("eieio" ::: "memory")
|
||||||
|
|
||||||
/*
|
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
|
||||||
* XXX At present these have both acquire and release semantics.
|
|
||||||
* Ultimately we should do separate _acq and _rel versions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
|
|
||||||
({ \
|
({ \
|
||||||
__typeof (*(mem)) __tmp; \
|
__typeof (*(mem)) __tmp; \
|
||||||
__typeof (mem) __memp = (mem); \
|
__typeof (mem) __memp = (mem); \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile ( \
|
||||||
"1: lwarx %0,0,%1\n" \
|
"1: lwarx %0,0,%1\n" \
|
||||||
" cmpw %0,%2\n" \
|
" cmpw %0,%2\n" \
|
||||||
" bne 2f\n" \
|
" bne 2f\n" \
|
||||||
@ -87,7 +90,38 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
__tmp; \
|
__tmp; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define __arch_atomic_exchange_32(mem, value) \
|
#define __arch_compare_and_exchange_val_32_rel(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
__typeof (*(mem)) __tmp; \
|
||||||
|
__typeof (mem) __memp = (mem); \
|
||||||
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
|
"1: lwarx %0,0,%1\n" \
|
||||||
|
" cmpw %0,%2\n" \
|
||||||
|
" bne 2f\n" \
|
||||||
|
" stwcx. %3,0,%1\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
"2: " \
|
||||||
|
: "=&r" (__tmp) \
|
||||||
|
: "b" (__memp), "r" (oldval), "r" (newval) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__tmp; \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define __arch_atomic_exchange_32_acq(mem, value) \
|
||||||
|
({ \
|
||||||
|
__typeof (*mem) __val; \
|
||||||
|
__asm __volatile ( \
|
||||||
|
"1: lwarx %0,0,%2\n" \
|
||||||
|
" stwcx. %3,0,%2\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
" " __ARCH_ACQ_INSTR \
|
||||||
|
: "=&r" (__val), "=m" (*mem) \
|
||||||
|
: "b" (mem), "r" (value), "1" (*mem) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__val; \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define __arch_atomic_exchange_32_rel(mem, value) \
|
||||||
({ \
|
({ \
|
||||||
__typeof (*mem) __val; \
|
__typeof (*mem) __val; \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
@ -96,7 +130,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
" bne- 1b" \
|
" bne- 1b" \
|
||||||
: "=&r" (__val), "=m" (*mem) \
|
: "=&r" (__val), "=m" (*mem) \
|
||||||
: "b" (mem), "r" (value), "1" (*mem) \
|
: "b" (mem), "r" (value), "1" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -109,7 +143,7 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
" bne- 1b" \
|
" bne- 1b" \
|
||||||
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
||||||
: "b" (mem), "r" (value), "2" (*mem) \
|
: "b" (mem), "r" (value), "2" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -124,11 +158,10 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
"2: " __ARCH_ACQ_INSTR \
|
"2: " __ARCH_ACQ_INSTR \
|
||||||
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
||||||
: "b" (mem), "2" (*mem) \
|
: "b" (mem), "2" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
|
||||||
({ \
|
({ \
|
||||||
__typeof (*(mem)) __result; \
|
__typeof (*(mem)) __result; \
|
||||||
@ -140,14 +173,38 @@ typedef uintmax_t uatomic_max_t;
|
|||||||
abort (); \
|
abort (); \
|
||||||
__result; \
|
__result; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define atomic_compare_and_exchange_val_rel(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
__typeof (*(mem)) __result; \
|
||||||
|
if (sizeof (*mem) == 4) \
|
||||||
|
__result = __arch_compare_and_exchange_val_32_rel(mem, newval, oldval); \
|
||||||
|
else if (sizeof (*mem) == 8) \
|
||||||
|
__result = __arch_compare_and_exchange_val_64_rel(mem, newval, oldval); \
|
||||||
|
else \
|
||||||
|
abort (); \
|
||||||
|
__result; \
|
||||||
|
})
|
||||||
|
|
||||||
#define atomic_exchange_acq(mem, value) \
|
#define atomic_exchange_acq(mem, value) \
|
||||||
({ \
|
({ \
|
||||||
__typeof (*(mem)) __result; \
|
__typeof (*(mem)) __result; \
|
||||||
if (sizeof (*mem) == 4) \
|
if (sizeof (*mem) == 4) \
|
||||||
__result = __arch_atomic_exchange_32 (mem, value); \
|
__result = __arch_atomic_exchange_32_acq (mem, value); \
|
||||||
else if (sizeof (*mem) == 8) \
|
else if (sizeof (*mem) == 8) \
|
||||||
__result = __arch_atomic_exchange_64 (mem, value); \
|
__result = __arch_atomic_exchange_64_acq (mem, value); \
|
||||||
|
else \
|
||||||
|
abort (); \
|
||||||
|
__result; \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define atomic_exchange_rel(mem, value) \
|
||||||
|
({ \
|
||||||
|
__typeof (*(mem)) __result; \
|
||||||
|
if (sizeof (*mem) == 4) \
|
||||||
|
__result = __arch_atomic_exchange_32_rel (mem, value); \
|
||||||
|
else if (sizeof (*mem) == 8) \
|
||||||
|
__result = __arch_atomic_exchange_64_rel (mem, value); \
|
||||||
else \
|
else \
|
||||||
abort (); \
|
abort (); \
|
||||||
__result; \
|
__result; \
|
||||||
|
@ -24,7 +24,23 @@
|
|||||||
* (a load word and zero (high 32) form). So powerpc64 has a slightly
|
* (a load word and zero (high 32) form). So powerpc64 has a slightly
|
||||||
* different version in sysdeps/powerpc/powerpc64/bits/atomic.h.
|
* different version in sysdeps/powerpc/powerpc64/bits/atomic.h.
|
||||||
*/
|
*/
|
||||||
# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
|
# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
unsigned int __tmp; \
|
||||||
|
__asm __volatile ( \
|
||||||
|
"1: lwarx %0,0,%1\n" \
|
||||||
|
" subf. %0,%2,%0\n" \
|
||||||
|
" bne 2f\n" \
|
||||||
|
" stwcx. %3,0,%1\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
"2: " __ARCH_ACQ_INSTR \
|
||||||
|
: "=&r" (__tmp) \
|
||||||
|
: "b" (mem), "r" (oldval), "r" (newval) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__tmp != 0; \
|
||||||
|
})
|
||||||
|
|
||||||
|
# define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int __tmp; \
|
unsigned int __tmp; \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
@ -33,7 +49,7 @@
|
|||||||
" bne 2f\n" \
|
" bne 2f\n" \
|
||||||
" stwcx. %3,0,%1\n" \
|
" stwcx. %3,0,%1\n" \
|
||||||
" bne- 1b\n" \
|
" bne- 1b\n" \
|
||||||
"2: " __ARCH_ACQ_INSTR \
|
"2: " \
|
||||||
: "=&r" (__tmp) \
|
: "=&r" (__tmp) \
|
||||||
: "b" (mem), "r" (oldval), "r" (newval) \
|
: "b" (mem), "r" (oldval), "r" (newval) \
|
||||||
: "cr0", "memory"); \
|
: "cr0", "memory"); \
|
||||||
@ -50,8 +66,17 @@
|
|||||||
|
|
||||||
# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
|
# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
|
||||||
(abort (), (__typeof (*mem)) 0)
|
(abort (), (__typeof (*mem)) 0)
|
||||||
|
|
||||||
|
# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
|
||||||
|
(abort (), 0)
|
||||||
|
|
||||||
# define __arch_atomic_exchange_64(mem, value) \
|
# define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
|
||||||
|
(abort (), (__typeof (*mem)) 0)
|
||||||
|
|
||||||
|
# define __arch_atomic_exchange_64_acq(mem, value) \
|
||||||
|
({ abort (); (*mem) = (value); })
|
||||||
|
|
||||||
|
# define __arch_atomic_exchange_64_rel(mem, value) \
|
||||||
({ abort (); (*mem) = (value); })
|
({ abort (); (*mem) = (value); })
|
||||||
|
|
||||||
# define __arch_atomic_exchange_and_add_64(mem, value) \
|
# define __arch_atomic_exchange_and_add_64(mem, value) \
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
|
# define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
|
||||||
({ \
|
({ \
|
||||||
unsigned int __tmp; \
|
unsigned int __tmp; \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile ( \
|
||||||
"1: lwarx %0,0,%1\n" \
|
"1: lwarx %0,0,%1\n" \
|
||||||
" extsw %0,%0\n" \
|
" extsw %0,%0\n" \
|
||||||
" subf. %0,%2,%0\n" \
|
" subf. %0,%2,%0\n" \
|
||||||
@ -44,6 +44,23 @@
|
|||||||
__tmp != 0; \
|
__tmp != 0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
unsigned int __tmp; \
|
||||||
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
|
"1: lwarx %0,0,%1\n" \
|
||||||
|
" extsw %0,%0\n" \
|
||||||
|
" subf. %0,%2,%0\n" \
|
||||||
|
" bne 2f\n" \
|
||||||
|
" stwcx. %3,0,%1\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
"2: " \
|
||||||
|
: "=&r" (__tmp) \
|
||||||
|
: "b" (mem), "r" (oldval), "r" (newval) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__tmp != 0; \
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Only powerpc64 processors support Load doubleword and reserve index (ldarx)
|
* Only powerpc64 processors support Load doubleword and reserve index (ldarx)
|
||||||
* and Store doubleword conditional indexed (stdcx) instructions. So here
|
* and Store doubleword conditional indexed (stdcx) instructions. So here
|
||||||
@ -52,7 +69,7 @@
|
|||||||
# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
|
# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
|
||||||
({ \
|
({ \
|
||||||
unsigned long __tmp; \
|
unsigned long __tmp; \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile ( \
|
||||||
"1: ldarx %0,0,%1\n" \
|
"1: ldarx %0,0,%1\n" \
|
||||||
" subf. %0,%2,%0\n" \
|
" subf. %0,%2,%0\n" \
|
||||||
" bne 2f\n" \
|
" bne 2f\n" \
|
||||||
@ -65,11 +82,27 @@
|
|||||||
__tmp != 0; \
|
__tmp != 0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
unsigned long __tmp; \
|
||||||
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
|
"1: ldarx %0,0,%1\n" \
|
||||||
|
" subf. %0,%2,%0\n" \
|
||||||
|
" bne 2f\n" \
|
||||||
|
" stdcx. %3,0,%1\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
"2: " \
|
||||||
|
: "=&r" (__tmp) \
|
||||||
|
: "b" (mem), "r" (oldval), "r" (newval) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__tmp != 0; \
|
||||||
|
})
|
||||||
|
|
||||||
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
|
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
|
||||||
({ \
|
({ \
|
||||||
__typeof (*(mem)) __tmp; \
|
__typeof (*(mem)) __tmp; \
|
||||||
__typeof (mem) __memp = (mem); \
|
__typeof (mem) __memp = (mem); \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile ( \
|
||||||
"1: ldarx %0,0,%1\n" \
|
"1: ldarx %0,0,%1\n" \
|
||||||
" cmpd %0,%2\n" \
|
" cmpd %0,%2\n" \
|
||||||
" bne 2f\n" \
|
" bne 2f\n" \
|
||||||
@ -82,7 +115,38 @@
|
|||||||
__tmp; \
|
__tmp; \
|
||||||
})
|
})
|
||||||
|
|
||||||
# define __arch_atomic_exchange_64(mem, value) \
|
#define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
|
||||||
|
({ \
|
||||||
|
__typeof (*(mem)) __tmp; \
|
||||||
|
__typeof (mem) __memp = (mem); \
|
||||||
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
|
"1: ldarx %0,0,%1\n" \
|
||||||
|
" cmpd %0,%2\n" \
|
||||||
|
" bne 2f\n" \
|
||||||
|
" stdcx. %3,0,%1\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
"2: " \
|
||||||
|
: "=&r" (__tmp) \
|
||||||
|
: "b" (__memp), "r" (oldval), "r" (newval) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__tmp; \
|
||||||
|
})
|
||||||
|
|
||||||
|
# define __arch_atomic_exchange_64_acq(mem, value) \
|
||||||
|
({ \
|
||||||
|
__typeof (*mem) __val; \
|
||||||
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
|
"1: ldarx %0,0,%2\n" \
|
||||||
|
" stdcx. %3,0,%2\n" \
|
||||||
|
" bne- 1b\n" \
|
||||||
|
" " __ARCH_ACQ_INSTR \
|
||||||
|
: "=&r" (__val), "=m" (*mem) \
|
||||||
|
: "b" (mem), "r" (value), "1" (*mem) \
|
||||||
|
: "cr0", "memory"); \
|
||||||
|
__val; \
|
||||||
|
})
|
||||||
|
|
||||||
|
# define __arch_atomic_exchange_64_rel(mem, value) \
|
||||||
({ \
|
({ \
|
||||||
__typeof (*mem) __val; \
|
__typeof (*mem) __val; \
|
||||||
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
__asm __volatile (__ARCH_REL_INSTR "\n" \
|
||||||
@ -91,7 +155,7 @@
|
|||||||
" bne- 1b" \
|
" bne- 1b" \
|
||||||
: "=&r" (__val), "=m" (*mem) \
|
: "=&r" (__val), "=m" (*mem) \
|
||||||
: "b" (mem), "r" (value), "1" (*mem) \
|
: "b" (mem), "r" (value), "1" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -104,7 +168,7 @@
|
|||||||
" bne- 1b" \
|
" bne- 1b" \
|
||||||
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
||||||
: "b" (mem), "r" (value), "2" (*mem) \
|
: "b" (mem), "r" (value), "2" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -119,7 +183,7 @@
|
|||||||
"2: " __ARCH_ACQ_INSTR \
|
"2: " __ARCH_ACQ_INSTR \
|
||||||
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
: "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
|
||||||
: "b" (mem), "2" (*mem) \
|
: "b" (mem), "2" (*mem) \
|
||||||
: "cr0"); \
|
: "cr0", "memory"); \
|
||||||
__val; \
|
__val; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -127,6 +191,12 @@
|
|||||||
* All powerpc64 processors support the new "light weight" sync (lwsync).
|
* All powerpc64 processors support the new "light weight" sync (lwsync).
|
||||||
*/
|
*/
|
||||||
# define atomic_read_barrier() __asm ("lwsync" ::: "memory")
|
# define atomic_read_barrier() __asm ("lwsync" ::: "memory")
|
||||||
|
/*
|
||||||
|
* "light weight" sync can also be used for the release barrier.
|
||||||
|
*/
|
||||||
|
# ifndef UP
|
||||||
|
# define __ARCH_REL_INSTR "lwsync"
|
||||||
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include the rest of the atomic ops macros which are common to both
|
* Include the rest of the atomic ops macros which are common to both
|
||||||
|
Loading…
Reference in New Issue
Block a user