Skip to content

Build error on MIPS 32bit #664

Open
Open
@faulesocke

Description

@faulesocke
error[E0432]: unresolved import `std::sync::atomic::AtomicU64`
 --> [...]/async-std-1.4.0/src/task/task_id.rs:2:25
  |
2 | use std::sync::atomic::{AtomicU64, Ordering};
  |                         ^^^^^^^^^
  |                         |
  |                         no `AtomicU64` in `sync::atomic`
  |                         help: a similar name exists in the module: `AtomicU8

Unfortunately, according to the docs, 64bit atomic types are not available on 32bit mips architectures.

I've looked into the source location and two solutions to this come to my mind:

  1. use AtomicU32. This might or might not be okay on 32bit architectures.
  2. Rewrite this (for mips only) with blocking logic (i.e. keep the counter inside a mutex)

If someone tells me which one is the preferred solution, I can write a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions