Commit 2af9ca3
committed
rust: factory: Add rros_release_element function
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.
3. Eliminate warnings in factory.rs, most of them are dead_code warnings.1 parent 32bd9f9 commit 2af9ca3
11 files changed
Lines changed: 412 additions & 309 deletions
File tree
- kernel/rros
- rust/kernel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
| 562 | + | |
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
1031 | | - | |
| 1031 | + | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments