Skip to content

Conversation

@Koichi98
Copy link
Contributor

@Koichi98 Koichi98 commented Jun 18, 2025

Description

Since fatfs is originally implemented for single thread application, structures that appear in fatfs source code directly hold the reference of its struct FileSystem. Because of this, it is difficult to use those structures in the source code that we cannot statically define the life time.
To solve this, we just have to introduce Arc so that the validity of this reference is checked dynamically.

This is partial PR of the implementation in PR #511. Please refer to #511 to see the overall description of these PRs.

Related links

#511

How was this PR tested?

Notes for reviewers

Signed-off-by: Koichi Imai <[email protected]>
@Koichi98 Koichi98 changed the title fix(fatfs): use arc for struct FileSystem reference in struct File, struct Dir, etc fix(fatfs): use Arc for struct FileSystem reference in struct File, struct Dir, etc Jun 18, 2025
@Koichi98 Koichi98 self-assigned this Jun 18, 2025
@Koichi98 Koichi98 marked this pull request as ready for review June 18, 2025 08:24
@Koichi98 Koichi98 requested review from veqcc and ytakano June 18, 2025 09:01
Signed-off-by: Koichi <[email protected]>
@ytakano ytakano merged commit 8f95e61 into main Jun 20, 2025
1 check passed
@ytakano ytakano deleted the fix_fatfs_arc branch June 20, 2025 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants