BUPT-OS / RROS

RROS is a dual-kernel OS for satellites or other scenarios that need both real-time and general-purpose abilities. RROS = RTOS (Rust) + Linux (C).
https://bupt-os.github.io/website/
Other
567 stars 40 forks source link

rust: factory: Add rros_release_element function #62

Open yexuanyang opened 3 weeks ago

yexuanyang commented 3 weeks ago

Diff:

  1. In factory.rs:
    • Change the field inside and dispose in struct RrosFactory.
    • Implement methods remove_element_device, is_public, __do_put_element, do_put_element_work, do_put_element_irq, do_put_element, put_element for RrosElement
    • Modify the code used inside, because type has changed from Option<RrosFactoryInside> to RrosFactoryInside.
    • Add function unbind_file_to_element
    • Add function rros_open_element and rros_release_element
  2. In sub factory(proxy/buf/poll,etc. .rs): Change the static factory creation.
  3. In device.rs: Implement unregister for Device
  4. In type.rs: Implement hash_del for HlistNode

Status:

  1. Compilation: Compile with clang-13.0.1 toolchain, ARCH=arm64, use rros_defconfig.
  2. Functional test: Haven't started yet.

Related issue: resolving #47

yexuanyang commented 3 weeks ago

Status:

  1. Compilation: Compile with clang-13.0.1 toolchain, ARCH=arm64, use rros_defconfig.

The compilation finishes with 13 warnings. All of them are about never used.