Skip to content

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 [email protected]

@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 <[email protected]>
@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