Skip to content

Conversation

isoux
Copy link

@isoux isoux commented May 7, 2025

Hey Gian!

... I prefer it without external crates too ...

I managed to implement your Mutex everywhere and even added it to the files where you had warnings:

//Warning! Mutable static here
//TODO: Implement a mutex to get safe access to this

It wasn't as difficult as it seemed at first. The key to the solution is in the raw pointers. So to access the static mut XYZ like there:

FAT.acquire().list_entries();
FAT.free();

Now you must write like this:

((&raw mut FAT)).acquire().list_entries();
(
(&raw mut FAT)).free();

Accordingly, I had to adjust and move some unsafe {} ...

The code now compiles and runs without errors or warnings on the latest nightly build 1.88 rust 2024

Isoux

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.

1 participant