Skip to content

Commit d1daf77

Browse files
committed
Replace extern functions with foreign functions
1 parent edb3a68 commit d1daf77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

text/0000-returns-twice.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[summary]: #summary
88

99
This RFC adds a new function attribute, `#[ffi_returns_twice]`, which indicates
10-
that an `extern` function can return multiple times.
10+
that an foreign function can return multiple times.
1111

1212
# Motivation
1313
[motivation]: #motivation
@@ -22,10 +22,10 @@ return only once. That is, when the execution arrives at the function call, the
2222
function is called, it returns a single value, and that's it. This assumption
2323
allows Rust to perform many optimizations.
2424

25-
However, some `extern` functions like [`setjmp`] and [`vfork`] can return
25+
However, some foreign functions like [`setjmp`] and [`vfork`] can return
2626
multiple times.
2727

28-
The `#[ffi_returns_twice]` attribute specifies that an `extern` function might
28+
The `#[ffi_returns_twice]` attribute specifies that an foreign function might
2929
returns multiple times, inhibiting optimizations that assume that this is never
3030
the case.
3131

@@ -36,7 +36,7 @@ the case.
3636
# Guide-level and reference-level explanation
3737
[guide-level-explanation]: #guide-level-explanation
3838

39-
The `#[ffi_returns_twice]` function attribute specifies that an `extern` function
39+
The `#[ffi_returns_twice]` function attribute specifies that an foreign function
4040
might return multiple times, disabling optimizations that are incorrect for such
4141
functions. Two examples of such functions are [`setjmp`] and [`vfork`].
4242

@@ -89,7 +89,7 @@ multiple times possible?
8989
# Future possibilities
9090
[future-possibilities]: #future-possibilities
9191

92-
This RFC attempts to make writing programs that interface with extern functions
92+
This RFC attempts to make writing programs that interface with foreign functions
9393
that return multiple times possible, but doing so is very challenging because it
9494
is trivial to introduce undefined behavior in those programs.
9595

0 commit comments

Comments
 (0)