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

process: read AT_CLKTCK from the auxv #53

Merged
merged 1 commit into from
Jun 26, 2019
Merged

Conversation

giuseppe
Copy link
Member

read AT_CLKTCK directly from the auxv vector, so it is possible to use
psgo without requiring cgo.

This is what internally sysconf does, although it doesn't use
/proc/self/auxv but read directly from memory.

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

@vrothberg
Copy link
Member

@giuseppe, that's a great improvement 👍 Which use-case motivated this PR?

Tests aren't hip yet:

# github.com/containers/psgo/internal/host [github.com/containers/psgo/internal/host.test]
internal/host/host_test.go:25:8: assignment mismatch: 1 variable but ClockTicks returns 2 values

read AT_CLKTCK directly from the auxv vector, so it is possible to use
psgo without requiring cgo.

This is what internally sysconf does, although it doesn't use
/proc/self/auxv but read directly from memory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe
Copy link
Member Author

@giuseppe, that's a great improvement +1 Which use-case motivated this PR?

I am trying to build Podman for RISC-V: containers/podman#3437

It is not really usable yet as it lacks support for SHM locks, but at least it builds now :D

@vrothberg
Copy link
Member

Travis has network flakes, so I'll force merge. Thanks @giuseppe!

@vrothberg vrothberg merged commit fbef66e into containers:master Jun 26, 2019
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.

2 participants