atomic32.go 399 B

12345678910111213141516
  1. // Copyright 2024 The Libc Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build linux && (386 || arm)
  5. package libc // import "modernc.org/libc"
  6. import (
  7. mbits "math/bits"
  8. )
  9. // static inline int a_ctz_l(unsigned long x)
  10. func _a_ctz_l(tls *TLS, x ulong) int32 {
  11. return int32(mbits.TrailingZeros32(x))
  12. }