Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenedFileTable needs to be shareable #106

Closed
michalfita opened this issue Nov 26, 2021 · 1 comment
Closed

OpenedFileTable needs to be shareable #106

michalfita opened this issue Nov 26, 2021 · 1 comment

Comments

@michalfita
Copy link
Contributor

At the moment Process::fork() seem to clone the OpenedFileTable while for proper multithreading we have to have shared access to opened files following clone(2) semantics supported by the Linux Kernel.

Found during work on #88 and belongs to Multithreading milestone (I can't add myself).

More details in the flags mask of clone(2), scroll down to CLONE_FILES. I haven't checked yet how it's implemented in Linux Kernel.

@nuta
Copy link
Owner

nuta commented Nov 27, 2021

I think so too. Similar to #107, let's use Arc<SpinLock<OpenedFileTable>> for opened_files.

michalfita added a commit to michalfita/kerla that referenced this issue Mar 23, 2022

Unverified

This user has not yet uploaded their public signing key.
…st `SpinLock<>`
@nuta nuta closed this as completed in a47e12e Mar 25, 2022
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

No branches or pull requests

2 participants