@@ -173,7 +173,7 @@ the same stack as the rust stack. This means that there is no extra
173173stack-switching mechanism in place because it is assumed that the large stack
174174for the rust task is plenty for the C function to have.
175175
176- A planned future improvement (net yet implemented at the time of this writing)
176+ A planned future improvement (not yet implemented at the time of this writing)
177177is to have a guard page at the end of every rust stack. No rust function will
178178hit this guard page (due to Rust's usage of LLVM's ` __morestack ` ). The intention
179179for this unmapped page is to prevent infinite recursion in C from overflowing
@@ -201,7 +201,7 @@ It is possible to pass functions defined in Rust to an external library.
201201The requirement for this is that the callback function is marked as ` extern `
202202with the correct calling convention to make it callable from C code.
203203
204- The callback function that can then be sent to through a registration call
204+ The callback function can then be sent through a registration call
205205to the C library and afterwards be invoked from there.
206206
207207A basic example is:
@@ -243,14 +243,14 @@ void trigger_callback() {
243243}
244244~~~~
245245
246- In this example will Rust's `main()` will call `do_callback()` in C,
247- which would call back to `callback()` in Rust.
246+ In this example Rust's `main()` will call `do_callback()` in C,
247+ which would, in turn, call back to `callback()` in Rust.
248248
249249
250- ## Targetting callbacks to Rust objects
250+ ## Targeting callbacks to Rust objects
251251
252252The former example showed how a global function can be called from C code.
253- However it is often desired that the callback is targetted to a special
253+ However it is often desired that the callback is targeted to a special
254254Rust object. This could be the object that represents the wrapper for the
255255respective C object.
256256
@@ -334,7 +334,7 @@ it is also absolutely necessary that no more callbacks are performed by the
334334C library after the respective Rust object gets destroyed.
335335This can be achieved by unregistering the callback in the object's
336336destructor and designing the library in a way that guarantees that no
337- callback will be performed after unregistration .
337+ callback will be performed after deregistration .
338338
339339# Linking
340340
0 commit comments