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
a7708a9f
Verified
Commit
a7708a9f
authored
1 year ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Fix AtomicPtr::as_ptr compiler version problem.
parent
84e5b412
No related branches found
No related tags found
1 merge request
!380
Replace pthreads-emb with a native implementation
Pipeline
#12089
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sync/mod.rs
+11
-2
11 additions, 2 deletions
src/sync/mod.rs
with
11 additions
and
2 deletions
src/sync/mod.rs
+
11
−
2
View file @
a7708a9f
...
@@ -59,12 +59,19 @@ impl FutexAtomicTy for AtomicU32 {
...
@@ -59,12 +59,19 @@ impl FutexAtomicTy for AtomicU32 {
fn
ptr
(
&
self
)
->
*
mut
u32
{
fn
ptr
(
&
self
)
->
*
mut
u32
{
// TODO: Change when Redox's toolchain is updated. This is not about targets, but compiler
// TODO: Change when Redox's toolchain is updated. This is not about targets, but compiler
// versions!
// versions!
/*
#[cfg(target_os = "redox")]
#[cfg(target_os = "redox")]
return AtomicU32::as_ptr(self);
return AtomicU32::as_ptr(self);
#[cfg(target_os = "linux")]
#[cfg(target_os = "linux")]
return AtomicU32::as_mut_ptr(self);
return AtomicU32::as_mut_ptr(self);
*/
// AtomicU32::as_mut_ptr internally calls UnsafeCell::get, which itself simply does (&self
// as *const Self as *mut Self).
self
as
*
const
AtomicU32
as
*
mut
u32
}
}
}
}
impl
FutexAtomicTy
for
AtomicI32
{
impl
FutexAtomicTy
for
AtomicI32
{
...
@@ -72,11 +79,13 @@ impl FutexAtomicTy for AtomicI32 {
...
@@ -72,11 +79,13 @@ impl FutexAtomicTy for AtomicI32 {
fn
ptr
(
&
self
)
->
*
mut
i32
{
fn
ptr
(
&
self
)
->
*
mut
i32
{
// TODO
// TODO
#[cfg(target_os
=
"redox"
)]
/*
#[cfg(target_os = "redox")]
return AtomicI32::as_ptr(self);
return AtomicI32::as_ptr(self);
#[cfg(target_os = "linux")]
#[cfg(target_os = "linux")]
return
AtomicI32
::
as_mut_ptr
(
self
);
return AtomicI32::as_mut_ptr(self);*/
self
as
*
const
AtomicI32
as
*
mut
i32
}
}
}
}
...
...
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