2
0
mirror of https://github.com/boostorg/context.git synced 2026-01-19 04:02:17 +00:00

Fix several typos

This commit is contained in:
Dirk Stolle
2025-05-01 23:26:37 +02:00
parent 64630f7285
commit 1775cebd4f
30 changed files with 50 additions and 50 deletions

View File

@@ -415,7 +415,7 @@ performance than __ucontext__
[note Because the TIB (thread information block on Windows) is not fully
described in the MSDN, it might be possible that not all required TIB-parts are
swapped. Using WinFiber implementation migh be an alternative.]
swapped. Using WinFiber implementation might be an alternative.]
[heading ucontext_t]

View File

@@ -10,7 +10,7 @@
[authors [Kowalke, Oliver]]
[copyright 2014 Oliver Kowalke]
[id context]
[purpose C++ Library for swiching different user ctx]
[purpose C++ Library for switching different user ctx]
[category text]
[license
Distributed under the Boost Software License, Version 1.0.

View File

@@ -18,7 +18,7 @@
</para>
</legalnotice>
<librarypurpose>
C++ Library for swiching different user ctx
C++ Library for switching different user ctx
</librarypurpose>
<librarycategory name="category:text"></librarycategory>
</libraryinfo>
@@ -619,7 +619,7 @@
<para>
Because the TIB (thread information block on Windows) is not fully described
in the MSDN, it might be possible that not all required TIB-parts are swapped.
Using WinFiber implementation migh be an alternative.
Using WinFiber implementation might be an alternative.
</para>
</note>
<bridgehead renderas="sect4" id="context.ff.implementations__fcontext_t__ucontext_t_and_winfiber.h1">
@@ -1707,7 +1707,7 @@
<para>
Because the TIB (thread information block on Windows) is not fully described
in the MSDN, it might be possible that not all required TIB-parts are swapped.
Using WinFiber implementation migh be an alternative.
Using WinFiber implementation might be an alternative.
</para>
</note>
<bridgehead renderas="sect4" id="context.cc.implementations__fcontext_t__ucontext_t_and_winfiber.h1">
@@ -2611,7 +2611,7 @@
time that <code><phrase role="special">*</phrase><phrase role="keyword">this</phrase></code>
needs to allocate system memory. The third argument <code><phrase role="identifier">max_size</phrase></code>
controls how many memory might be allocated for stacks - a value of
zero means no uper limit.
zero means no upper limit.
</para>
</listitem>
</varlistentry>
@@ -2942,7 +2942,7 @@
<title><link linkend="context.stack.stack_traits">Class <emphasis>stack_traits</emphasis></link></title>
<para>
<emphasis>stack_traits</emphasis> models a <emphasis>stack-traits</emphasis>
providing a way to access certain properites defined by the enironment. Stack
providing a way to access certain properties defined by the environment. Stack
allocators use <emphasis>stack-traits</emphasis> to allocate stacks.
</para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">/</phrase><phrase role="identifier">context</phrase><phrase role="special">/</phrase><phrase role="identifier">stack_traits</phrase><phrase role="special">.</phrase><phrase role="identifier">hpp</phrase><phrase role="special">&gt;</phrase>
@@ -3172,7 +3172,7 @@
Sanitizers (GCC/Clang) are confused by the stack switches. The library is
required to be compiled with property (b2 command-line) <code><phrase role="identifier">context</phrase><phrase
role="special">-</phrase><phrase role="identifier">impl</phrase><phrase role="special">=</phrase><phrase
role="identifier">ucontext</phrase></code> and compilers santizer options.
role="identifier">ucontext</phrase></code> and compilers sanitizer options.
Users must define <code><phrase role="identifier">BOOST_USE_ASAN</phrase></code>
before including any Boost.Context headers when linking against Boost binaries.
</para>

View File

@@ -399,7 +399,7 @@ performance than __ucontext__
[note Because the TIB (thread information block on Windows) is not fully
described in the MSDN, it might be possible that not all required TIB-parts are
swapped. Using WinFiber implementation migh be an alternative.]
swapped. Using WinFiber implementation might be an alternative.]
[heading ucontext_t]

View File

@@ -46,7 +46,7 @@
<tr><td align="left" valign="top"><p>
Because the TIB (thread information block on Windows) is not fully described
in the MSDN, it might be possible that not all required TIB-parts are swapped.
Using WinFiber implementation migh be an alternative.
Using WinFiber implementation might be an alternative.
</p></td></tr>
</table></div>
<h5>

View File

@@ -851,7 +851,7 @@
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Efects:</span></dt>
<dt><span class="term">Effects:</span></dt>
<dd><p>
Writes the representation of <code class="computeroutput"><span class="identifier">other</span></code>
to stream <code class="computeroutput"><span class="identifier">os</span></code>.

View File

@@ -120,7 +120,7 @@
on <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>)
and <code class="computeroutput"><span class="identifier">args</span></code> are the data passed
to <span class="emphasis"><em>execution_context::operator()</em></span>. The return value represents
the execution_context that has to be resumed, after termiantion of this context.
the execution_context that has to be resumed, after termination of this context.
</p>
<p>
Benefits of <a class="link" href="ecv2.html#ecv2"><span class="emphasis"><em>execution_context</em></span> (v2)</a>
@@ -780,7 +780,7 @@
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">Efects:</span></dt>
<dt><span class="term">Effects:</span></dt>
<dd><p>
Writes the representation of <code class="computeroutput"><span class="identifier">other</span></code>
to stream <code class="computeroutput"><span class="identifier">os</span></code>.

View File

@@ -46,7 +46,7 @@
<tr><td align="left" valign="top"><p>
Because the TIB (thread information block on Windows) is not fully described
in the MSDN, it might be possible that not all required TIB-parts are swapped.
Using WinFiber implementation migh be an alternative.
Using WinFiber implementation might be an alternative.
</p></td></tr>
</table></div>
<h5>

View File

@@ -46,7 +46,7 @@
<tr><td align="left" valign="top"><p>
Because the TIB (thread information block on Windows) is not fully described
in the MSDN, it might be possible that not all required TIB-parts are swapped.
Using WinFiber implementation migh be an alternative.
Using WinFiber implementation might be an alternative.
</p></td></tr>
</table></div>
<h5>

View File

@@ -73,7 +73,7 @@
time that <code class="computeroutput"><span class="special">*</span><span class="keyword">this</span></code>
needs to allocate system memory. The third argument <code class="computeroutput"><span class="identifier">max_size</span></code>
controls how many memory might be allocated for stacks - a value of
zero means no uper limit.
zero means no upper limit.
</p></dd>
</dl>
</div>

View File

@@ -28,7 +28,7 @@
</h3></div></div></div>
<p>
Sanitizers (GCC/Clang) are confused by the stack switches. The library is
required to be compiled with property (b2 command-line) <code class="computeroutput"><span class="identifier">context</span><span class="special">-</span><span class="identifier">impl</span><span class="special">=</span><span class="identifier">ucontext</span></code> and compilers santizer options.
required to be compiled with property (b2 command-line) <code class="computeroutput"><span class="identifier">context</span><span class="special">-</span><span class="identifier">impl</span><span class="special">=</span><span class="identifier">ucontext</span></code> and compilers sanitizer options.
Users must define <code class="computeroutput"><span class="identifier">BOOST_USE_ASAN</span></code>
before including any Boost.Context headers when linking against Boost binaries.
</p>

View File

@@ -28,7 +28,7 @@
</h3></div></div></div>
<p>
<span class="emphasis"><em>stack_traits</em></span> models a <span class="emphasis"><em>stack-traits</em></span>
providing a way to access certain properites defined by the enironment. Stack
providing a way to access certain properties defined by the environment. Stack
allocators use <span class="emphasis"><em>stack-traits</em></span> to allocate stacks.
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">context</span><span class="special">/</span><span class="identifier">stack_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>

View File

@@ -131,7 +131,7 @@ stack grows downwards/upwards) the stored address is the highest/lowest
address of the stack. Argument `next_size` determines the number of stacks to
request from the system the first time that `*this` needs to allocate system
memory. The third argument `max_size` controls how many memory might be
allocated for stacks - a value of zero means no uper limit.]]
allocated for stacks - a value of zero means no upper limit.]]
]
[heading `stack_context allocate()`]
@@ -256,7 +256,7 @@ available stack allocator.]
[section:stack_traits Class ['stack_traits]]
['stack_traits] models a __stack_traits__ providing a way to access certain
properites defined by the enironment. Stack allocators use __stack_traits__ to
properties defined by the environment. Stack allocators use __stack_traits__ to
allocate stacks.
#include <boost/context/stack_traits.hpp>
@@ -357,7 +357,7 @@ compiled with `valgrind=on`.
Sanitizers (GCC/Clang) are confused by the stack switches.
The library is required to be compiled with property (b2 command-line)
`context-impl=ucontext` and compilers santizer options.
`context-impl=ucontext` and compilers sanitizer options.
Users must define `BOOST_USE_ASAN` before including any Boost.Context headers
when linking against Boost binaries.

View File

@@ -74,7 +74,7 @@ template< typename Rec >
transfer_t context_exit( transfer_t t) noexcept {
Rec * rec = static_cast< Rec * >( t.data);
#if BOOST_CONTEXT_SHADOW_STACK
// destory shadow stack
// destroy shadow stack
std::size_t ss_size = *((unsigned long*)(reinterpret_cast< uintptr_t >( rec)- 16));
long unsigned int ss_base = *((unsigned long*)(reinterpret_cast< uintptr_t >( rec)- 8));
munmap((void *)ss_base, ss_size);
@@ -174,7 +174,7 @@ fcontext_t create_context1( StackAlloc && salloc, Fn && fn) {
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( Record) ) )
& ~static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
Record * record = new ( storage) Record{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// 64byte gab between control structure and stack top
@@ -216,7 +216,7 @@ fcontext_t create_context2( preallocated palloc, StackAlloc && salloc, Fn && fn)
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( Record) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context-stack
// placement new for control structure on context-stack
Record * record = new ( storage) Record{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// 64byte gab between control structure and stack top

View File

@@ -287,7 +287,7 @@ static activation_record * create_context1( StackAlloc && salloc, Fn && fn) {
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// stack bottom
@@ -330,7 +330,7 @@ static activation_record * create_context2( preallocated palloc, StackAlloc && s
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// stack bottom

View File

@@ -251,7 +251,7 @@ static activation_record * create_context1( StackAlloc && salloc, Fn && fn) {
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// create user-context
@@ -268,7 +268,7 @@ static activation_record * create_context2( preallocated palloc, StackAlloc && s
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// create user-context

View File

@@ -67,7 +67,7 @@
#if defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304
# undef BOOST_CONTEXT_NO_CXX14_INTEGER_SEQUENCE
#endif
// workaroud: MSVC 14 does not provide macros to test for compile-time integer sequence
// workaround: MSVC 14 does not provide macros to test for compile-time integer sequence
#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
# undef BOOST_CONTEXT_NO_INDEX_SEQUENCE
#endif
@@ -78,7 +78,7 @@
# endif
#endif
// workaroud: MSVC 14 does support constexpr
// workaround: MSVC 14 does support constexpr
#if _MSC_VER > 1800 // _MSC_VER == 1800 -> MS Visual Studio 2013
# undef BOOST_NO_CXX11_CONSTEXPR
#endif
@@ -112,7 +112,7 @@
// modern architectures have cachelines with 64byte length
// ARM Cortex-A15 32/64byte, Cortex-A9 16/32/64bytes
// MIPS 74K: 32byte, 4KEc: 16byte
// ist should be safe to use 64byte for all
// it should be safe to use 64byte for all
static constexpr std::size_t cache_alignment{ 64 };
static constexpr std::size_t cacheline_length{ 64 };
// lookahead size for prefetching

View File

@@ -123,7 +123,7 @@ template< typename Rec >
transfer_t fiber_exit( transfer_t t) noexcept {
Rec * rec = static_cast< Rec * >( t.data);
#if BOOST_CONTEXT_SHADOW_STACK
// destory shadow stack
// destroy shadow stack
std::size_t ss_size = *((unsigned long*)(reinterpret_cast< uintptr_t >( rec)- 16));
long unsigned int ss_base = *((unsigned long*)(reinterpret_cast< uintptr_t >( rec)- 8));
munmap((void *)ss_base, ss_size);
@@ -220,7 +220,7 @@ fcontext_t create_fiber1( StackAlloc && salloc, Fn && fn) {
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( Record) ) )
& ~static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
Record * record = new ( storage) Record{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// 64byte gab between control structure and stack top
@@ -262,7 +262,7 @@ fcontext_t create_fiber2( preallocated palloc, StackAlloc && salloc, Fn && fn) {
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( Record) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context-stack
// placwment new for control structure on context-stack
Record * record = new ( storage) Record{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// 64byte gab between control structure and stack top

View File

@@ -312,7 +312,7 @@ static fiber_activation_record * create_fiber1( StackAlloc && salloc, Fn && fn)
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// stack bottom
@@ -363,7 +363,7 @@ static fiber_activation_record * create_fiber2( preallocated palloc, StackAlloc
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// stack bottom

View File

@@ -250,7 +250,7 @@ static fiber_activation_record * create_fiber1( StackAlloc && salloc, Fn && fn)
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( sctx.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// create user-context
@@ -267,7 +267,7 @@ static fiber_activation_record * create_fiber2( preallocated palloc, StackAlloc
void * storage = reinterpret_cast< void * >(
( reinterpret_cast< uintptr_t >( palloc.sp) - static_cast< uintptr_t >( sizeof( capture_t) ) )
& ~ static_cast< uintptr_t >( 0xff) );
// placment new for control structure on context stack
// placement new for control structure on context stack
capture_t * record = new ( storage) capture_t{
palloc.sctx, std::forward< StackAlloc >( salloc), std::forward< Fn >( fn) };
// create user-context

View File

@@ -62,7 +62,7 @@ _make_fcontext:
movl %ecx, 0x14(%eax)
/* second arg of make_fcontext() == size of context-stack */
movl 0x8(%esp), %edx
/* negate stack size for LEA instruction (== substraction) */
/* negate stack size for LEA instruction (== subtraction) */
negl %edx
/* compute bottom address of context stack (limit) */
leal (%ecx,%edx), %ecx
@@ -94,7 +94,7 @@ _make_fcontext:
/* traverse current seh chain to get the last exception handler installed by Windows */
/* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */
/* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */
/* at its end by RaiseException all seh andlers are disregarded if not present and the */
/* at its end by RaiseException all seh handlers are disregarded if not present and the */
/* program is aborted */
/* load NT_TIB into ECX */
movl %fs:(0x0), %ecx

View File

@@ -62,7 +62,7 @@ _make_fcontext:
movl %ecx, 0x14(%eax)
/* second arg of make_fcontext() == size of context-stack */
movl 0x8(%esp), %edx
/* negate stack size for LEA instruction (== substraction) */
/* negate stack size for LEA instruction (== subtraction) */
negl %edx
/* compute bottom address of context stack (limit) */
leal (%ecx,%edx), %ecx
@@ -94,7 +94,7 @@ _make_fcontext:
/* traverse current seh chain to get the last exception handler installed by Windows */
/* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */
/* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */
/* at its end by RaiseException all seh andlers are disregarded if not present and the */
/* at its end by RaiseException all seh handlers are disregarded if not present and the */
/* program is aborted */
/* load NT_TIB into ECX */
movl %fs:(0x0), %ecx

View File

@@ -53,7 +53,7 @@ make_fcontext PROC BOOST_CONTEXT_EXPORT
mov [eax+014h], ecx
; second arg of make_fcontext() == size of context-stack
mov edx, [esp+08h]
; negate stack size for LEA instruction (== substraction)
; negate stack size for LEA instruction (== subtraction)
neg edx
; compute bottom address of context stack (limit)
lea ecx, [ecx+edx]

View File

@@ -70,7 +70,7 @@ make_fcontext:
# save global pointer in context-data
sd $gp, 136($v0)
# psudo instruction compute abs address of label finish based on GP
# pseudo instruction compute abs address of label finish based on GP
dla $t9, finish
# save address of finish as return-address for context-function

View File

@@ -45,7 +45,7 @@ make_fcontext:
add %l0, (trampoline - 1b - 8), %l0
stx %l0, [%i0 + I7]
# Save framepointer to first stack frame but first substract the BIAS
# Save framepointer to first stack frame but first subtract the BIAS
add %i0, CC64FSZ - BIAS, %l0
stx %l0, [%i0 + SP]

View File

@@ -113,7 +113,7 @@ make_fcontext:
/* save top address of context stack as 'base' */
movq %rcx, 0xc8(%rax)
/* second arg of make_fcontext() == size of context-stack */
/* negate stack size for LEA instruction (== substraction) */
/* negate stack size for LEA instruction (== subtraction) */
negq %rdx
/* compute bottom address of context stack (limit) */
leaq (%rcx,%rdx), %rcx

View File

@@ -113,7 +113,7 @@ make_fcontext:
/* save top address of context stack as 'base' */
movq %rcx, 0xc8(%rax)
/* second arg of make_fcontext() == size of context-stack */
/* negate stack size for LEA instruction (== substraction) */
/* negate stack size for LEA instruction (== subtraction) */
negq %rdx
/* compute bottom address of context stack (limit) */
leaq (%rcx,%rdx), %rcx

View File

@@ -110,7 +110,7 @@ make_fcontext PROC BOOST_CONTEXT_EXPORT FRAME
; save top address of context stack as 'base'
mov [rax+0c8h], rcx
; second arg of make_fcontext() == size of context-stack
; negate stack size for LEA instruction (== substraction)
; negate stack size for LEA instruction (== subtraction)
neg rdx
; compute bottom address of context stack (limit)
lea rcx, [rcx+rdx]

View File

@@ -479,7 +479,7 @@ void test_badcatch() {
BOOST_CHECK_EQUAL( 3., value3);
// the destruction of ctx here will cause a forced_unwind to be thrown that is not caught
// in fn19. That will trigger the "not caught" assertion in ~forced_unwind. Getting that
// assertion to propogate bak here cleanly is non-trivial, and there seems to not be a good
// assertion to propagate back here cleanly is non-trivial, and there seems to not be a good
// way to hook directly into the assertion when it happens on an alternate stack.
std::move( c);
}

View File

@@ -501,7 +501,7 @@ void test_badcatch() {
BOOST_CHECK_EQUAL( 3., value3);
// the destruction of ctx here will cause a forced_unwind to be thrown that is not caught
// in fn19. That will trigger the "not caught" assertion in ~forced_unwind. Getting that
// assertion to propogate bak here cleanly is non-trivial, and there seems to not be a good
// assertion to propagate back here cleanly is non-trivial, and there seems to not be a good
// way to hook directly into the assertion when it happens on an alternate stack.
std::move( f);
}