Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
relibc
Commits
44ec1676
Verified
Commit
44ec1676
authored
8 months ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Activate new threads' TCBs early.
parent
01ce7f5a
No related branches found
Branches containing commit
No related tags found
1 merge request
!485
Process/thread distinction improvements
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
redox-rt/src/arch/x86_64.rs
+2
-0
2 additions, 0 deletions
redox-rt/src/arch/x86_64.rs
src/pthread/mod.rs
+4
-1
4 additions, 1 deletion
src/pthread/mod.rs
with
6 additions
and
1 deletion
redox-rt/src/arch/x86_64.rs
+
2
−
0
View file @
44ec1676
...
...
@@ -430,6 +430,8 @@ pub unsafe fn arch_pre(stack: &mut SigStack, area: &mut SigArea) {
static
SUPPORTS_AVX
:
AtomicU8
=
AtomicU8
::
new
(
1
);
// FIXME
// __relibc will be prepended to the name, so mangling is fine
#[no_mangle]
pub
unsafe
fn
manually_enter_trampoline
()
{
let
c
=
&
Tcb
::
current
()
.unwrap
()
.os_specific.control
;
c
.control_flags
.store
(
...
...
This diff is collapsed.
Click to expand it.
src/pthread/mod.rs
+
4
−
1
View file @
44ec1676
...
...
@@ -244,6 +244,10 @@ unsafe extern "C" fn new_thread_shim(
mutex1
:
*
const
Mutex
<
MaybeUninit
<
OsTid
>>
,
mutex2
:
*
const
Mutex
<
u64
>
,
)
->
!
{
if
let
Some
(
tcb
)
=
tcb
.as_mut
()
{
tcb
.activate
();
}
let
procmask
=
(
&*
mutex2
)
.as_ptr
()
.read
();
let
tid
=
(
*
(
&*
mutex1
)
.lock
())
.assume_init
();
...
...
@@ -256,7 +260,6 @@ unsafe extern "C" fn new_thread_shim(
if
let
Some
(
tcb
)
=
tcb
.as_mut
()
{
tcb
.copy_masters
()
.unwrap
();
tcb
.activate
();
}
(
*
tcb
)
.pthread.os_tid
.get
()
.write
(
Sys
::
current_os_tid
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment