You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spawn a new thread running the given function with the argument value `arg`.
87
+
Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread.
88
88
89
89
## thread_id
90
90
@@ -112,7 +112,7 @@ u64 thread_join(u64 tid)
112
112
113
113
**Returns:**`u64 val`
114
114
115
-
Join on the thread with the given id. Produces the return value for the thread.
115
+
Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create().
// Spawn a new thread running the given function with the argument value `arg`.
53
+
// Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread.
// Join on the thread with the given id. Produces the return value for the thread.
68
+
// Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create().
// Spawn a new thread running the given function with the argument value `arg`.
264
+
// Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread.
// Join on the thread with the given id. Produces the return value for the thread.
276
+
// Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create().
Copy file name to clipboardExpand all lines: spec/syscalls.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@
160
160
],
161
161
"permission": "default_allowed",
162
162
"const_idx": 29,
163
-
"description": "Spawn a new thread running the given function with the argument value `arg`."
163
+
"description": "Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread."
164
164
},
165
165
{
166
166
"name": "thread_id",
@@ -203,7 +203,7 @@
203
203
],
204
204
"permission": "default_allowed",
205
205
"const_idx": 31,
206
-
"description": "Join on the thread with the given id. Produces the return value for the thread."
206
+
"description": "Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create()."
// Spawn a new thread running the given function with the argument value `arg`.
53
+
// Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread.
// Join on the thread with the given id. Produces the return value for the thread.
68
+
// Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create().
// Spawn a new thread running the given function with the argument value `arg`.
264
+
// Spawn a new thread running the given function with the argument value `arg`. This is a low-level primitive: the spawned thread has no software (alloca) stack, so a C thread function that uses local arrays, address-taken locals, or alloca will fault. From C, prefer pthread_create() from <pthread.h>, which installs a private stack for the new thread.
// Join on the thread with the given id. Produces the return value for the thread.
276
+
// Join on the thread with the given id (as returned by thread_spawn). Produces the return value for the thread. From C, prefer pthread_join() from <pthread.h> when the thread was created with pthread_create().
0 commit comments