unikraft / lib-musl

musl: A C standard library
Other
9 stars 29 forks source link

Thread support for musl #9

Closed dragosargint closed 1 year ago

dragosargint commented 2 years ago

This PR contains essential changes for thread support in musl. This PR is currently a superset of https://github.com/unikraft/lib-musl/pull/5 , which will need to be merged first (So please don't bother with the first 4 commits). This PR is dependent on: [1] Simon's uksched refactor: https://github.com/skuenzer/unikraft/tree/skuenzer/sched-refactor [2] unikraft/unikraft#454 [3] unikraft/unikraft#453 [4] unikraft/unikraft#442 [5] unikraft/unikraft#441 [6] https://github.com/unikraft/unikraft/pull/488

[4] Cannot be automatically be merged into [1] right now, I will provide a patch on discord

craciunoiuc commented 2 years ago

All good from my side now, waiting on the other reviewers to add the tag.

flpostolache commented 2 years ago

The PR looks good. I just have one question. Should we write somewhere that in order to make the clone wrapper function work, CLONE_VM, CLONE_FILES and CLONE_FS should be added as flags?

dragosargint commented 2 years ago

The PR looks good. I just have one question. Should we write somewhere that in order to make the clone wrapper function work, CLONE_VM, CLONE_FILES and CLONE_FS should be added as flags?

The flags are not added, they are default in musl for creating threads as we discussed. Indeed, in the release documentation, it should be mentioned that the `clone()' syscall only works for creating threads. Therefore, these flags must be used.

flpostolache commented 2 years ago

Looks good. Reviewed-by: Florin Postolache florin.postolache80@gmail.com

kubanrob commented 2 years ago

It seems like Makefile.uk.musl.process:#LIBMUSL_PROCESS_SRCS-y += $(LIBMUSL)/src/process/waitpid.c needs to be commented in to build with the current Unikraft branch.

razvanvirtan commented 2 years ago

Yes, it happened to me too (I think you mean uncommented?)

dragosargint commented 2 years ago

It seems like Makefile.uk.musl.process:#LIBMUSL_PROCESS_SRCS-y += $(LIBMUSL)/src/process/waitpid.c needs to be commented in to build with the current Unikraft branch.

Hi, Robert! Thank you for your comment! You are right, that source must be uncommented from the Makefile. I modified this PR https://github.com/unikraft/lib-musl/pull/5 and rebased this one as well.

kubanrob commented 2 years ago

@dragosargint Can you please change my information to Robert Kuban <robert.kuban@opensynergy.com> in commit 2a3c2a0? Yours are generated by the web interface as well.

kubanrob commented 2 years ago

Just 2 minor things:

dragosargint commented 1 year ago

Hi, @dragosargint . See some cosmetic comments from my side.

Thank you for the comments, @razvand. I applied your suggestions.