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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: freebsd specific version #19962

Merged
merged 5 commits into from Nov 23, 2023
Merged

sync: freebsd specific version #19962

merged 5 commits into from Nov 23, 2023

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented Nov 21, 2023

Fix #19946

馃[deprecated] Generated by Copilot at 5841084

Add sync_freebsd.v file to implement the sync module for FreeBSD. The file provides concurrency primitives using the C pthread and semaphore libraries. The change improves V's portability and compatibility on different operating systems.

馃[deprecated] Generated by Copilot at 5841084

  • Implement sync module for FreeBSD platform (link)

@spytheman
Copy link
Member

That is a bit weird to me. I expected that the new platform file will be a copy of vlib/sync/sync_darwin.c.v, but apparently it worked with a copy of the default one 馃, with just minimal changes.

@felipensp
Copy link
Member Author

felipensp commented Nov 22, 2023

That is a bit weird to me. I expected that the new platform file will be a copy of vlib/sync/sync_darwin.c.v, but apparently it worked with a copy of the default one 馃, with just minimal changes.

On Darwin implementation it does not use pointer in the typedef too (just like Linux).

image

@felipensp felipensp marked this pull request as ready for review November 23, 2023 01:10
@felipensp
Copy link
Member Author

That is a bit weird to me. I expected that the new platform file will be a copy of vlib/sync/sync_darwin.c.v, but apparently it worked with a copy of the default one 馃, with just minimal changes.

On this FreeBSD implementation, it does expects ** pointers to be provided to handle the allocation itself.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested the latest changes on my FreeBSD vps, and indeed works well. Excellent work.

@spytheman spytheman merged commit 9d7fe51 into vlang:master Nov 23, 2023
48 checks passed
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.

using -cc clang, compiling v with -cstrict fails
2 participants